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

How to get an artifact's parent directory? #723

Open
cbarrete opened this issue Jul 22, 2024 · 2 comments
Open

How to get an artifact's parent directory? #723

cbarrete opened this issue Jul 22, 2024 · 2 comments

Comments

@cbarrete
Copy link
Contributor

Up until now, I have been following the documentation's suggestion of using cmd_args(my_artifact).parent() for this, but it doesn't work anymore as of the 2024-07-01 release. What is the suggested alternative?

@cormacrelf
Copy link
Contributor

cormacrelf commented Jul 23, 2024

Basically all of the methods on cmd_args are migrating to kwargs, so it's cmd_args(artifact, parent = 1), or parent=2 to go two levels up.

Leave the issue open because the docs need fixing:

@zjturner
Copy link
Contributor

Note that this doesn't really give you the artifact's parent directory. It gives you a cmd_args() that contains the artifact's parent directory as something that you can pass into an actions.run(). In particular, it does not give you the artifact's parent directory as an Artifact, so you can't use it (for example) to ctx.actions.symlinked_dir(...) or various other methods. And AFAICT, there is no way to do that.

facebook-github-bot pushed a commit that referenced this issue Jul 31, 2024
Summary:
Relates to #723.

Pull Request resolved: #725

Reviewed By: iguridi

Differential Revision: D60524015

Pulled By: blackm00n

fbshipit-source-id: 5f6a34b6f30eaa5a2cbbf7a19a110e9fa6449a73
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

No branches or pull requests

3 participants