File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ usage() {
1818 local lines=()
1919 while IFS=' ' read line; do
2020 if [[ " ${line: 0: 1} " != ' #' ]]; then
21- printf ' %s\n' " Usage: $0 [ disable | restore ]" " ${lines[@]: 1} " >&2
21+ printf ' %s\n' " Usage: $0 [ on | off | restore ]" " ${lines[@]: 1} " >&2
2222 exit " $1 "
2323 fi
2424 lines+=(" ${line: 2} " )
@@ -42,7 +42,7 @@ update_bazelrc_files() {
4242 local enabled_options=" $workspace_options "
4343 local disabled_options=" $bzlmod_options "
4444
45- if [[ " $mode " == " disable " ]]; then
45+ if [[ " $mode " == " off " ]]; then
4646 enabled_options=" $bzlmod_options "
4747 disabled_options=" $workspace_options "
4848 fi
@@ -115,12 +115,12 @@ get_bazelrc_files_by_status() {
115115 done < <( git status -s ' .bazelrc' ' **/.bazelrc' )
116116}
117117
118- if [[ " $# " -gt 1 ]]; then
118+ if [[ " $# " -ne 1 ]]; then
119119 usage 1
120120fi
121121
122122case " $1 " in
123- " " |disable )
123+ on|off )
124124 update_bazelrc_files " $1 "
125125 ;;
126126 restore)
You can’t perform that action at this time.
0 commit comments