Skip to content

Commit e342ef1

Browse files
authored
Merge pull request #75 from ancarda/master
Fix usage line in help page to be path to program
2 parents 590cfec + 32ce48b commit e342ef1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bin/jsonlint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (isset($_SERVER['argc']) && $_SERVER['argc'] > 1) {
3737
$quiet = true;
3838
} else {
3939
if ($arg == '-h' || $arg == '--help') {
40-
showUsage();
40+
showUsage($_SERVER['argv'][0]);
4141
} else {
4242
$files[] = $arg;
4343
}
@@ -106,9 +106,9 @@ function lintFile($file, $quiet = false)
106106
}
107107

108108
// usage text function
109-
function showUsage()
109+
function showUsage($programPath)
110110
{
111-
echo 'Usage: jsonlint file [options]'.PHP_EOL;
111+
echo 'Usage: '.$programPath.' file [options]'.PHP_EOL;
112112
echo PHP_EOL;
113113
echo 'Options:'.PHP_EOL;
114114
echo ' -q, --quiet Cause jsonlint to be quiet when no errors are found'.PHP_EOL;

0 commit comments

Comments
 (0)