Skip to content

Commit d51b37a

Browse files
Copilotyarikoptic
andcommitted
Improve sed readability with separate -e flags
Co-authored-by: yarikoptic <[email protected]>
1 parent 0469827 commit d51b37a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if git fetch -v 2>&1 | grep -q github.com/; then
1515
if ! git remote | grep -q "$ghremote" ; then
1616
if GH_TOKEN="$GITHUB_TOKEN" gh repo fork --remote --remote-name "$ghremote"; then
1717
# disable actions in the fork -- we just want to provide contributions upstream
18-
fork_repo=$(git remote get-url "$ghremote" | sed -e 's,.*github.com[:/],,; s,\.git$,,')
18+
fork_repo=$(git remote get-url "$ghremote" | sed -e 's|.*github.com[:/]||' -e 's|\.git$||')
1919
GH_TOKEN="$GITHUB_TOKEN" gh api -X PUT "repos/$fork_repo/actions/permissions" -F enabled=false || \
2020
echo "WARNING: Failed to disable actions on fork $fork_repo" >&2
2121
else

0 commit comments

Comments
 (0)