Skip to content

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Sep 3, 2025

In trying to address confusion with the - (for stdin) directory flag last year, I had template push read from stdin if stdin was not a TTY. However, I made the mistake of checking if the directory flag was set or not by comparing it to the default value. This meant in something like GitHub Actions, where you don't have a TTY for stdin, it was impossible to read from the current working directory. The fix is just to check if the flag was explicitly set, using pflags.

If users encounter this bug, and this fix is unavailable in their version of Coder, they can workaround it by setting -d "$(pwd)"

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson force-pushed the ethan/fix-unintentional-stdin branch from 58a6752 to 32ee661 Compare September 3, 2025 01:18
@ethanndickson ethanndickson marked this pull request as ready for review September 3, 2025 01:25
@ethanndickson ethanndickson merged commit f867a9d into main Sep 4, 2025
44 checks passed
@ethanndickson ethanndickson deleted the ethan/fix-unintentional-stdin branch September 4, 2025 04:31
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants