Skip to content

Commit 5263bef

Browse files
committed
fix: add set -o pipefail to all bin scripts, switch to bash
Change shebang from #!/bin/sh to #!/usr/bin/env bash across all 21 bin scripts. Add set -o pipefail after set -e in all 20 executable scripts (lib is sourced, not executed directly). Pipefail ensures pipe component failures propagate correctly, which is required by the failure mode test suite and enforced by the Quality Gates static analysis check.
1 parent aaf1162 commit 5263bef

21 files changed

Lines changed: 41 additions & 41 deletions

bin/git-issue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue - Distributed issue tracking embedded in Git
44
#
55
# Usage: git issue <command> [<args>]
66
#
77

88
set -e
9-
9+
set -o pipefail
1010
VERSION="1.3.3"
1111

1212
usage() {

bin/git-issue-comment

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-comment - Add a comment to an issue
44
#
55

66
set -e
7-
7+
set -o pipefail
88
. "$(dirname "$0")/git-issue-lib"
99

1010
usage() {

bin/git-issue-create

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-create - Create a new issue
44
#
55

66
set -e
7-
7+
set -o pipefail
88
. "$(dirname "$0")/git-issue-lib"
99

1010
usage() {

bin/git-issue-edit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-edit - Edit metadata of an existing issue
44
#
55

66
set -e
7-
7+
set -o pipefail
88
. "$(dirname "$0")/git-issue-lib"
99

1010
usage() {

bin/git-issue-export

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-export - Export local issues to an external provider
44
#
55

66
set -e
7-
7+
set -o pipefail
88
usage() {
99
cat <<EOF
1010
usage: git issue export <provider> [options]

bin/git-issue-export-gitea

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-export-gitea - Export issues to Gitea/Forgejo
44
#
@@ -7,7 +7,7 @@
77
#
88

99
set -e
10-
10+
set -o pipefail
1111
usage() {
1212
cat <<EOF
1313
usage: git issue export gitea:<owner>/<repo> [options]

bin/git-issue-export-github

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-export-github - Export issues to GitHub
44
#
55
# Usage: git issue export github:<owner>/<repo> [options]
66
#
77

88
set -e
9-
9+
set -o pipefail
1010
usage() {
1111
cat <<EOF
1212
usage: git issue export github:<owner>/<repo> [options]

bin/git-issue-export-gitlab

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-export-gitlab - Export issues to GitLab
44
#
55
# Usage: git issue export gitlab:<group>/<project> [options]
66
#
77

88
set -e
9-
9+
set -o pipefail
1010
usage() {
1111
cat <<EOF
1212
usage: git issue export gitlab:<group>/<project> [options]

bin/git-issue-fsck

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-fsck - Validate issue data integrity
44
#
@@ -7,7 +7,7 @@
77
#
88

99
set -e
10-
10+
set -o pipefail
1111
. "$(dirname "$0")/git-issue-lib"
1212

1313
usage() {

bin/git-issue-import

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# git-issue-import - Import issues from an external provider
44
#
55

66
set -e
7-
7+
set -o pipefail
88
usage() {
99
cat <<EOF
1010
usage: git issue import <provider> [options]

0 commit comments

Comments
 (0)