From 7d0004809d2cd5daf992e465415b1d40ed1fc7b9 Mon Sep 17 00:00:00 2001 From: Jess Bees Date: Tue, 29 Nov 2022 16:42:54 -0500 Subject: [PATCH] Print warnings about changed file permissions in bulk This will avoid mangled output when files have spaces within them. --- action.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 9d1d147..658c301 100644 --- a/action.yml +++ b/action.yml @@ -17,9 +17,8 @@ runs: shell: sh if: runner.os == 'Linux' run: | - for f in $(chmod -c -R +r . | awk '{print substr($3, 2, length($3)-2)}') - do - echo "::warning::Added read permission to $f" + chmod -c -R +r . | while read line; do + echo "::warning title=Changed permissions on a file::$line" done tar \ --dereference --hard-dereference \ @@ -36,9 +35,8 @@ runs: shell: sh if: runner.os == 'macOS' run: | - for f in $(chmod -v -R +r .) - do - echo "::warning::Added read permission to $f" + chmod -v -R +r . | while read line; do + echo "::warning title=Changed permissions on a file::$line" done gtar \ --dereference --hard-dereference \