1
0
Fork 0
mirror of synced 2024-12-04 21:35:34 -05:00

Compare commits

...

4 commits

Author SHA1 Message Date
Anish Athalye
9593510bd4 Merge branch 's1as3r/master' 2022-11-17 13:26:55 -05:00
Anish Athalye
5d34d005e8 Fix test 2022-11-17 13:26:32 -05:00
Arbaaz Shafiq
76ccc53eee Don't show command if quiet: true
Don't print the command if quiet option is set to true and no
description is given.
2022-11-17 13:23:23 -05:00
Anish Athalye
1971ae9f51 Add workaround for test broken by Git security fix
The fix for this Git security issue [1] involved disabling the local
clone optimization when the repository contains symbolic links. The
security fix broke this particular test; this patch works around the
fix.

[1]: https://github.com/git/git/security/advisories/GHSA-3wp6-j8xr-qw85
2022-11-17 10:27:21 -05:00
3 changed files with 7 additions and 5 deletions

View file

@ -42,10 +42,11 @@ class Shell(dotbot.Plugin):
else: else:
cmd = item cmd = item
msg = None msg = None
if msg is None: if quiet:
if msg is not None:
self._log.lowinfo("%s" % msg)
elif msg is None:
self._log.lowinfo(cmd) self._log.lowinfo(cmd)
elif quiet:
self._log.lowinfo("%s" % msg)
else: else:
self._log.lowinfo("%s [%s]" % (msg, cmd)) self._log.lowinfo("%s [%s]" % (msg, cmd))
stdout = options.get("stdout", stdout) stdout = options.get("stdout", stdout)

View file

@ -20,9 +20,9 @@ test_expect_success 'run 2' '
EOF EOF
' '
# when no description, expect to see command # when no description, expect no output
test_expect_success 'run 3' ' test_expect_success 'run 3' '
(run_dotbot | grep "echo banana") <<EOF (run_dotbot | (! grep "echo banana")) <<EOF
- shell: - shell:
- command: echo banana - command: echo banana
quiet: true quiet: true

View file

@ -2,6 +2,7 @@ test_description='install shim works'
. '../test-lib.bash' . '../test-lib.bash'
test_expect_success 'setup' ' test_expect_success 'setup' '
git config --global protocol.file.allow always
cd ${DOTFILES} cd ${DOTFILES}
git init git init
git submodule add ${BASEDIR} dotbot git submodule add ${BASEDIR} dotbot