unknown_error_bypass
This commit is contained in:
+26
-1
@@ -35,4 +35,29 @@ count=0
|
||||
```bash
|
||||
count=0
|
||||
count=$((count+1))
|
||||
`
|
||||
```
|
||||
|
||||
## properly grab $?
|
||||
|
||||
> prefer plain `command` rather than `! command`
|
||||
> otherwise you will miss out the exit code
|
||||
|
||||
### wrong if
|
||||
|
||||
```bash
|
||||
if ! command; then
|
||||
local code=$?
|
||||
>&2 echo $code # => 0
|
||||
fi
|
||||
```
|
||||
|
||||
### right if
|
||||
|
||||
```bash
|
||||
if command; then
|
||||
: # useful for preserving $?
|
||||
else
|
||||
local code=$?
|
||||
>&2 echo $code
|
||||
fi
|
||||
```
|
||||
|
||||
+6
-3
@@ -32,6 +32,9 @@ echo 'echo PIPE2' | miaou-bash
|
||||
|
||||
## TODO
|
||||
|
||||
* [ ] prompt git shows version with `+` when there is more than one commit over current version. ie: v0.0.0 + 2 commits more should display v-1.0.0+
|
||||
* [ ] semver_git_tag should append `RELEASE_NOTES.md` from this TODO markdown file, providing that NEW NOTE section below contains appropriate items to fulfill the current release note
|
||||
* [ ] git log <LATEST_TAG>..HEAD --oneline
|
||||
* [ ] prompt should show up version with `+` when there is more than one commit,
|
||||
not yet versioned. ie: v0.0.0 + 2 commits more should display v0.0.0+
|
||||
* [ ] semver_git_tag should append `RELEASE_NOTES.md` from this TODO markdown file,
|
||||
providing that NEW NOTE section below contains appropriate items
|
||||
to fulfill the current release note
|
||||
* [ ] git log <LATEST_TAG>..HEAD --oneline
|
||||
|
||||
Reference in New Issue
Block a user