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

app-dir default to working_directory #42

Closed
BrandonMathis opened this issue Jul 6, 2020 · 2 comments · Fixed by #45
Closed

app-dir default to working_directory #42

BrandonMathis opened this issue Jul 6, 2020 · 2 comments · Fixed by #45
Assignees

Comments

@BrandonMathis
Copy link

Orb version

3.0.1

What happened

Error on node/install-packages

---
Unable to find your package.json file. Did you forget to set the app-dir parameter?
---

Current directory: /home/circleci/project

Expected behavior

I have working_directory set in my .circleci/config.yml and I feel that app-dir should default to that.

Thoughs? I would be willing to try my hand at a PR if this is even possible. Not sure CircleCI exposes the value of working_directory to orbs.

@FelicianoTech
Copy link
Contributor

Interesting. There is an environment variable for working_directory called $CIRCLE_WORKING_DIRECTORY. There's a parameter type specifically for environment variables but the problem with that is then we HAVE to use one for this, which is a breaking change and less flexible.

Perhaps switching the default value to app-dir to an empty string would work. Then, if there's a non-empty string, it uses that path. If it's empty, then we use $CIRCLE_WORKING_DIRECTORY. @CircleCI-Public/cpeng Thoughts?

@gmemstr
Copy link
Contributor

gmemstr commented Jul 27, 2020

I think this is the best solution - looking into implementing this shortly.

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 a pull request may close this issue.

3 participants