Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for -C flag to chdir before running #4421

Open
archie2x opened this issue Aug 20, 2024 · 2 comments
Open

add support for -C flag to chdir before running #4421

archie2x opened this issue Aug 20, 2024 · 2 comments
Labels
enhancement New feature or request next-release Will be part of next release

Comments

@archie2x
Copy link
Contributor

Supported by big Go since 1.20 for all commands. It's helpful for scripting. Expected behavior:

  • cd's to argument

  • runs rest of command

    tinygo run -C path/to/dir some_file.go # some_file.go is in path/to/dir

See go help build:

% go help build
usage: go build [-o output] [build flags] [packages]

[...]

  -C dir
    Change to dir before running the command.
    Any files named on the command line are interpreted after
    changing directories.
    If used, this flag must be the first one in the command line.

[...]
archie2x added a commit to archie2x/tinygo that referenced this issue Aug 20, 2024
Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Aug 20, 2024
Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Aug 20, 2024
Signed-off-by: Roger Standridge <[email protected]>
@deadprogram deadprogram added the enhancement New feature or request label Sep 6, 2024
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 6, 2024
Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 6, 2024
Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 10, 2024
…hanges directory)

Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 10, 2024
Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 10, 2024
Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 10, 2024
…hanges directory)

Signed-off-by: Roger Standridge <[email protected]>
archie2x added a commit to archie2x/tinygo that referenced this issue Sep 11, 2024
…hanges directory)

Signed-off-by: Roger Standridge <[email protected]>
deadprogram pushed a commit that referenced this issue Sep 13, 2024
feature: Fix #4421: Add `-C DIR` flag

Signed-off-by: Roger Standridge <[email protected]>
@archie2x
Copy link
Contributor Author

Fixed by 5abf1e9. Can I close?

@dgryski
Copy link
Member

dgryski commented Sep 13, 2024

We generally close after the release that includes this fix is out. I'll tag this issue as "next-release" so it gets handled correctly.

@dgryski dgryski added the next-release Will be part of next release label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next-release Will be part of next release
Projects
None yet
Development

No branches or pull requests

3 participants