diff options
| -rwxr-xr-x | lib/tools/find.nom | 2 | ||||
| -rwxr-xr-x | lib/tools/format.nom | 2 | ||||
| -rwxr-xr-x | lib/tools/replace.nom | 2 | ||||
| -rwxr-xr-x | lib/tools/upgrade.nom | 5 |
4 files changed, 8 insertions, 3 deletions
diff --git a/lib/tools/find.nom b/lib/tools/find.nom index aa4bc7b..a4db987 100755 --- a/lib/tools/find.nom +++ b/lib/tools/find.nom @@ -63,7 +63,7 @@ command line program with $args: $code = (NomsuCode from ($Source $filename 1 (size of $file)) $file) try: $tree = ($code parsed) - ..if it fails $msg: + ..if it fails with $msg: say red (" \$filename failed to parse: diff --git a/lib/tools/format.nom b/lib/tools/format.nom index e60d12e..445f35e 100755 --- a/lib/tools/format.nom +++ b/lib/tools/format.nom @@ -28,7 +28,7 @@ command line program with $args: $code = (NomsuCode from ($Source $filename 1 (size of $file)) $file) try: $tree = ($code parsed) - ..if it fails $msg: + ..if it fails with $msg: if $args.q: $formatted = $file ..else: diff --git a/lib/tools/replace.nom b/lib/tools/replace.nom index fdb8e38..efc4d09 100755 --- a/lib/tools/replace.nom +++ b/lib/tools/replace.nom @@ -93,7 +93,7 @@ command line program with $args: $code = (NomsuCode from ($Source $filename 1 (size of $file)) $file) try: $tree = ($code parsed) - ..if it fails $msg: + ..if it fails with $msg: if $args.q: unless $args.i: say $code ..else: diff --git a/lib/tools/upgrade.nom b/lib/tools/upgrade.nom index 1ef91b9..2c63411 100755 --- a/lib/tools/upgrade.nom +++ b/lib/tools/upgrade.nom @@ -15,6 +15,11 @@ use "commandline" command line program with $args: $inplace = ($args.i or $args.inplace) $start_version = $args."upgrade-from" + if $start_version: + try: + use $start_version + ..if it fails: + fail "Could not find upgrade rules for \$start_version" $version = ($args."upgrade-to" or (Nomsu version)) $test = ($args.t or $args.test) for $filename in $args.extras: |
