From a8dde6cef10828c26418d34d3a3fc75cc1d0d04b Mon Sep 17 00:00:00 2001 From: Paul Taylor <178183+trxcllnt@users.noreply.github.com> Date: Tue, 5 Sep 2023 15:17:42 -0700 Subject: [PATCH] Fix arg parse dash to underscore (#137) * convert dash to underscore * bump version --- features/src/utils/devcontainer-feature.json | 2 +- features/src/utils/opt/devcontainer/bin/parse-args.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/features/src/utils/devcontainer-feature.json b/features/src/utils/devcontainer-feature.json index 5996aaf1..f5b7b62b 100644 --- a/features/src/utils/devcontainer-feature.json +++ b/features/src/utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "devcontainer-utils", "id": "utils", - "version": "23.10.7", + "version": "23.10.8", "description": "A feature to install RAPIDS devcontainer utility scripts", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/utils/opt/devcontainer/bin/parse-args.sh b/features/src/utils/opt/devcontainer/bin/parse-args.sh index 037c9c74..4f0600ec 100755 --- a/features/src/utils/opt/devcontainer/bin/parse-args.sh +++ b/features/src/utils/opt/devcontainer/bin/parse-args.sh @@ -84,8 +84,9 @@ parse_args() { break; fi - if echo "${key}" | grep -qP "^${vars}$"; then - keys+=("${key//-/_}"); + if grep -qP "^${vars}$" <<< "${key}"; then + key="${key//-/_}"; + keys+=("$key"); dict[$key]="$(printf %q "${val}")"; else rest+=("${arg}");