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

cli: Default to unstripped dst if target dir is outside of current dir #9

Merged

Conversation

knutwalker
Copy link
Contributor

One could configure shared target-dir for cargo, for example:

❯ cat ~/.cargo/config.toml
[build]
target-dir = "/tmp/rustc-target-dir"

Which means that the packaged workflow is not in a subfolder of the current folder
and stripping the current folder as prefix results in an error.

This PR falls back to printing the full path in that case, for example:

❯ powerpack package
    Finished release [optimized] target(s) in 0.13s
    Replaced binary at `workflow/alfred-test`
    Packaged workflow at `/tmp/rustc-target-dir/workflow/alfred-test.alfredworkflow`

One could configure shared target-dir for cargo, for example:

```bash
❯ cat ~/.cargo/config.toml
[build]
target-dir = "/tmp/rustc-target-dir"
```

Which means that the packaged workflow is not in a subfolder of the current folder
and stripping the current folder as prefix results in an error.

This PR falls back to printing the full path in that case, for example:

```
❯ powerpack package
    Finished release [optimized] target(s) in 0.13s
    Replaced binary at `workflow/alfred-test`
    Packaged workflow at `/tmp/rustc-target-dir/workflow/alfred-test.alfredworkflow`
```
@rossmacarthur
Copy link
Owner

Looks good, thanks!

@rossmacarthur rossmacarthur merged commit 4a51d64 into rossmacarthur:trunk Sep 20, 2022
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.

2 participants