Skip to content

Commit

Permalink
Make optional handling more like the restof the program.
Browse files Browse the repository at this point in the history
  • Loading branch information
steviegt6 committed Jul 24, 2023
1 parent 2cb10e2 commit 4900cb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified run.n
Binary file not shown.
8 changes: 4 additions & 4 deletions src/hmm/commands/LockVersionCommand.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import thx.Validation;
import hmm.HmmConfig;
import hmm.LibraryConfig;
import hmm.errors.ValidationError;
import hmm.utils.Args;
import hmm.utils.Shell;
import hmm.utils.Log;

Expand All @@ -26,7 +27,7 @@ class LockVersionCommand implements ICommand {
var config = HmmConfigs.readHmmJsonOrThrow();

var libs = config.dependencies;
var longId = args.indexOf("--long-id") != -1;
var longId = Args.hasAny(args, ["--long-id", "-l"]);

// Filter out options.
var possibleLibs = args.filter(function (arg) return !arg.startsWith("--") && !arg.startsWith("-"));
Expand Down Expand Up @@ -55,11 +56,10 @@ class LockVersionCommand implements ICommand {
public function getUsage() {
return 'update libraries versions or refs in hmm.json.
usage: hmm lock [<lib1> [... <libn>]]
usage: hmm lock [-l|--long-id] [<lib1> [... <libn>]]

options:

(optional) --long-id - use the full commit hash (id) for git libraries
(optional) -l or --long-id - use the full commit hash (id) for git libraries

arguments: zero or more library names

Expand Down

0 comments on commit 4900cb9

Please sign in to comment.