Skip to content

Commit f63e23c

Browse files
committed
Trace a few things and bail early without any argument.
1 parent 03ecef9 commit f63e23c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
<key>scriptfile</key>
133133
<string></string>
134134
<key>subtext</key>
135-
<string>Open development projects folders</string>
135+
<string>Open development project folders</string>
136136
<key>title</key>
137137
<string>Quick Open Project</string>
138138
<key>type</key>

search.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
use Alfred\Workflows\ParamBuilder\Mod;
77

88
$workflow = new Workflow();
9+
$workflow->logger()->info('PHP version: '.phpversion());
10+
11+
if (! $workflow->argument()) {
12+
return;
13+
}
914

1015
if (empty($workflow->env('SEARCH_PATHS'))) {
1116
return;
@@ -25,6 +30,7 @@
2530

2631
// Match directories
2732
$matches = glob($searchPathString, GLOB_ONLYDIR | GLOB_BRACE);
33+
$workflow->logger()->info('Search glob: '.$searchPathString);
2834

2935
// Build a keyed list of directory folder names and full paths
3036
$list = [];
@@ -47,7 +53,8 @@
4753
]);
4854

4955
// Rock and roll
50-
$results = $fuse->search($workflow->argument() ?? '');
56+
$results = $fuse->search($workflow->argument());
57+
$workflow->logger()->info('Matching results: '.count($results));
5158

5259
foreach ($results as $result) {
5360
$workflow->item()

0 commit comments

Comments
 (0)