Skip to content

Conversation

@pbnj
Copy link
Contributor

@pbnj pbnj commented Mar 20, 2022

This is a proposal and an implementation to open repo's CI page (e.g. GitHub Actions, GitLab CI, Bitbucket Pipelines) in default browser.

Feedback is welcome, even if feedback is "thanks, but no thanks".

@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e -o pipefail
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get 128 exit code when no upstream is given after this modification...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be the combination of set -e and git rev-parse --abbrev-ref HEAD 2&> /dev/null (specifically the 2&> /dev/null).

Changing it to the shorthand version &> /dev/null or the longhand version >/dev/null 2>&1 fixes it for me.

@spacewander spacewander merged commit f556430 into tj:master Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants