From 6589bdd779bd6239fde4084ea5d98d2207603785 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 7 Jul 2023 18:14:01 +0200 Subject: [PATCH] test/system: Silence SC2088 Otherwise https://www.shellcheck.net/ would complain: Line 141: assert_line --index 0 "~/.bash_profile read" ^------------------^ SC2088 (warning): Tilde does not expand in quotes. Use $HOME. See: https://www.shellcheck.net/wiki/SC2088 This is a false positive. There's no need for the tilde to be expanded because it's not being used for any file system operation. It's merely a human-readable string. However, it's easier to change the string to use $HOME than littering the file with ShellCheck's inline 'disable' directives. https://github.com/containers/toolbox/pull/1366 --- test/system/104-run.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/system/104-run.bats b/test/system/104-run.bats index ee262e2..e62cf72 100644 --- a/test/system/104-run.bats +++ b/test/system/104-run.bats @@ -131,14 +131,14 @@ teardown() { create_default_container cp "$HOME"/.bash_profile "$HOME"/.bash_profile.orig - echo "echo \"~/.bash_profile read\"" >>"$HOME"/.bash_profile + echo "echo \"$HOME/.bash_profile read\"" >>"$HOME"/.bash_profile run "$TOOLBOX" run true mv "$HOME"/.bash_profile.orig "$HOME"/.bash_profile assert_success - assert_line --index 0 "~/.bash_profile read" + assert_line --index 0 "$HOME/.bash_profile read" assert [ ${#lines[@]} -eq 1 ] }