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

Ensure build output directory is created #4707

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

jphastings
Copy link
Contributor

@jphastings jphastings commented Jan 18, 2025

tinygo build -o /path/to/out . expected /path/to to already exist, which is different behaviour to go build. This change ensures tinygo creates any directories needed to be able to build to the specified output dir.

I wasn't certain how to effectively test this change within this repo (this is my first TinyGo contribution), any advice would be welcome!

fixes #4687

`tinygo build -o /path/to/out .` expected `/path/to/out` to already exist, which is different behaviour to `go build`. This change ensures tinygo creates any directories needed to be able to build to the specified output dir.
@jphastings jphastings force-pushed the 4687-create-output-dir branch from b7044ab to 70387ac Compare January 18, 2025 18:56
Copy link
Contributor

@leongross leongross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Imo there is no need to add tests for this, since we don't want to test standard library functionality

@deadprogram
Copy link
Member

Thanks for adding this @jphastings and to @leongross for review. Now merging.

@deadprogram deadprogram merged commit c1b267a into tinygo-org:dev Feb 19, 2025
17 checks passed
@jphastings jphastings deleted the 4687-create-output-dir branch February 19, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants