fix: avoid apostrophe in fm-brief.sh heredoc nested in command substitution - #1147
Closed
Seangee86 wants to merge 1 commit into
Closed
fix: avoid apostrophe in fm-brief.sh heredoc nested in command substitution#1147Seangee86 wants to merge 1 commit into
Seangee86 wants to merge 1 commit into
Conversation
…tution macOS ships bash 3.2, which mis-parses a single quote inside a heredoc when that heredoc is nested inside $(...). The no-mistakes DOD heredoc in the ship-brief case block contained "firstmate's", which broke fm-brief.sh with "unexpected EOF while looking for matching \'" on any default macOS shell. Reworded to drop the apostrophe.
Owner
|
thanks for tracking this down. i merged #1093, which fixes the same macOS bash 3.2 parse failure - it removes the command substitution around those heredocs instead of rewording the apostrophe, so i'm closing this one as superseded. appreciate the help here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bin/fm-brief.shcrashes withunexpected EOF while looking for matching \'''on macOS's default bash (3.2.57) when scaffolding a ship brief for ano-mistakes`-mode project.$(...)command substitution (reproduced independently outside this repo; a standalone top-level heredoc with the same apostrophe is fine, only the nested-in-$()case breaks).no-mistakes-mode DOD heredoc (DOD=$(cat <<EOF ... EOF)) in the ship-brief case block contains the word "firstmate's", which trips this.$(...)).Test plan
bash -n bin/fm-brief.shpasses (previously failed with the EOF/quote error)bin/fm-brief.sh <id> <repo>(no-mistakes mode) scaffolds successfully end to end