File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Code generated by go.husin.dev/toolstub@(devel) . DO NOT EDIT.
3+ # Code generated by go.husin.dev/toolstub@v0.2.0-98234d400a07687995163c014781efb26cb150f7 . DO NOT EDIT.
44
55set -euo pipefail
66
@@ -34,12 +34,13 @@ function install_tool() {
3434
3535# 3. Run!
3636function run() {
37- go tool -modfile=" ${modfile} " " ${TOOLIMPORT} "
37+ # shellcheck disable=SC2068 # Intentionally splat args from user / console.
38+ go tool -modfile=" ${modfile} " " ${TOOLIMPORT} " $@
3839}
3940
4041function main() {
4142 DEBUG_TOOLSTUB=${DEBUG_TOOLSTUB:- " " }
42- if [[ ! -z " ${DEBUG_TOOLSTUB} " ]]; then
43+ if [[ -n " ${DEBUG_TOOLSTUB} " ]]; then
4344 yellow=$( tput setaf 3)
4445 magenta=$( tput setaf 5)
4546 cyan=$( tput setaf 6)
@@ -51,7 +52,9 @@ function main() {
5152
5253 gomod
5354 install_tool
55+ # shellcheck disable=SC2068 # Intentionally splat args from user / console.
5456 run $@
5557}
5658
59+ # shellcheck disable=SC2068 # Intentionally splat args from user / console.
5760main $@
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Code generated by go.husin.dev/toolstub@v0.1.0+dirty-6c31d38a170f09d33c0962237fc2af4a2d172075 . DO NOT EDIT.
3+ # Code generated by go.husin.dev/toolstub@v0.2.0-98234d400a07687995163c014781efb26cb150f7 . DO NOT EDIT.
44
55set -euo pipefail
66
@@ -34,12 +34,13 @@ function install_tool() {
3434
3535# 3. Run!
3636function run() {
37+ # shellcheck disable=SC2068 # Intentionally splat args from user / console.
3738 go tool -modfile=" ${modfile} " " ${TOOLIMPORT} " $@
3839}
3940
4041function main() {
4142 DEBUG_TOOLSTUB=${DEBUG_TOOLSTUB:- " " }
42- if [[ ! -z " ${DEBUG_TOOLSTUB} " ]]; then
43+ if [[ -n " ${DEBUG_TOOLSTUB} " ]]; then
4344 yellow=$( tput setaf 3)
4445 magenta=$( tput setaf 5)
4546 cyan=$( tput setaf 6)
@@ -51,7 +52,9 @@ function main() {
5152
5253 gomod
5354 install_tool
55+ # shellcheck disable=SC2068 # Intentionally splat args from user / console.
5456 run $@
5557}
5658
59+ # shellcheck disable=SC2068 # Intentionally splat args from user / console.
5760main $@
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ func run() error {
6363
6464 f , err := os .OpenFile (fp , os .O_RDWR | os .O_CREATE , 0755 )
6565 if err != nil {
66- return fmt .Errorf ("opening file %q to write: %w" , fp )
66+ return fmt .Errorf ("opening file %q to write: %w" , fp , err )
6767 }
6868 defer f .Close ()
6969
You can’t perform that action at this time.
0 commit comments