Skip to content

Commit

Permalink
Fix crash when prefix of "lock" subcommand is used
Browse files Browse the repository at this point in the history
  • Loading branch information
gridbugs committed Apr 13, 2023
1 parent df43741 commit cf47ba2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
- Fix a failure when using opam-monorepo with an opam 2.2 root
(#379, @kit-ty-kate)

- Fix assertion failure when prefix of "lock" subcommand is used (#381,
@gridbugs)

### Removed

### Security
Expand Down
2 changes: 1 addition & 1 deletion cli/lock.ml
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ let extract_source_config ~adjustment ~opam_monorepo_cwd ~opam_files

let raw_cli_args () =
match Array.to_list Sys.argv with
| _bin :: "lock" :: args -> args
| _bin :: prefix :: args when String.starts_with ~prefix "lock" -> args
| _ -> assert false

let run (`Root root) (`Recurse_opam recurse) (`Build_only build_only)
Expand Down

0 comments on commit cf47ba2

Please sign in to comment.