Check goo script arguments to prevent data loss.#1487
Check goo script arguments to prevent data loss.#1487omsai merged 2 commits intoswcarpentry:mainfrom
Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/swcarpentry/shell-novice/compare/md-outputs..md-outputs-PR-1487 The following changes were observed in the rendered markdown documents: What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2025-08-18 11:46:51 +0000 |
|
Thanks for this. Any reason for changing the return code to 0 from 1 when the incorrect number of arguments are given? |
Co-authored-by: Benson Muite <bkmgit@users.noreply.github.com>
Auto-generated via `{sandpaper}`
Source : fe72161
Branch : main
Author : Trevor Keller <trevor.keller@gmail.com>
Time : 2025-08-18 11:47:26 +0000
Message : Check goo script arguments to prevent data loss. (#1487)
* Check goo script arguments to prevent data loss.
* Invalid arguments triggering a usage message should return an error code
Co-authored-by: Pariksheet Nanda <pan79@pitt.edu>
Co-authored-by: Benson Muite <bkmgit@users.noreply.github.com>
Auto-generated via `{sandpaper}`
Source : 2f4e620
Branch : md-outputs
Author : GitHub Actions <actions@github.com>
Time : 2025-08-18 11:48:09 +0000
Message : markdown source builds
Auto-generated via `{sandpaper}`
Source : fe72161
Branch : main
Author : Trevor Keller <trevor.keller@gmail.com>
Time : 2025-08-18 11:47:26 +0000
Message : Check goo script arguments to prevent data loss. (#1487)
* Check goo script arguments to prevent data loss.
* Invalid arguments triggering a usage message should return an error code
Co-authored-by: Pariksheet Nanda <pan79@pitt.edu>
Co-authored-by: Benson Muite <bkmgit@users.noreply.github.com>
Auto-generated via `{sandpaper}`
Source : 2f4e620
Branch : md-outputs
Author : GitHub Actions <actions@github.com>
Time : 2025-08-18 11:48:09 +0000
Message : markdown source builds
Auto-generated via `{sandpaper}`
Source : fe72161
Branch : main
Author : Trevor Keller <trevor.keller@gmail.com>
Time : 2025-08-18 11:47:26 +0000
Message : Check goo script arguments to prevent data loss. (#1487)
* Check goo script arguments to prevent data loss.
* Invalid arguments triggering a usage message should return an error code
Co-authored-by: Pariksheet Nanda <pan79@pitt.edu>
Co-authored-by: Benson Muite <bkmgit@users.noreply.github.com>
Often, the Instructor and Learners will run
goostats.shwithout arguments. The resulting usage message unhelpfully requests two files -- without warning that the second will be written into!This PR updates both "goo" scripts to check file arguments for existence before continuing.
goostats.sh: If$1is absent, or$2is present,exit 2(invalid arguments).goodiff.sh: If$1or$2is absent,exit 2(invalid arguments)."Usage" also updated to use
$0rather than hard-coding the script names.