Accept a working-directory as an input argument
See original GitHub issueI’m trying to setup node for my GitHub Action. But I’m not working in the default directory.
I clone a repo in dir_one/rep_one
and then clone another repo in dir_two/rep_two
and copy a couple of files from the first repo to the second repo.
Then I want to setup Node and npm install
on the second repo.
working-directory
doesn’t work with uses
and I also tried to - run: cd dir_two/repo_two
, but again build fails because it’s running in its folder.
I receive this error:
Error: Dependencies lock file is not found in /home/runner/work/Site/Site. Supported file patterns: package-lock.json,yarn.lock
Please create an input argument to accept path where node should search for package.json
file.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:46
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to set a Directory as an Argument in Bash - Stack Overflow
This script takes one argument, a directory name, and touches files in that directory and then displays a directory listing.
Read more >How to send the current working directory as an argument in ...
Windows maintains the current directory in the environment variable %CD% . echo %CD% c:\users\user pushd c:\temp echo %CD% c:\temp set ...
Read more >Passing reference or whole directory as input? - CWL Questions
Symlinks to input Files/Directories are passed to the Tool. If a config file specifies an absolute path, the Tool will not be able...
Read more >Shell Script to Check if Every Passed Argument is a File or ...
Approach 1: Algorithm: First check the provides argument is the directory or not using the if statement using the -d option for the...
Read more >Adding arguments and options to your Bash scripts - Red Hat
First, add a variable and initialize it. Add the two lines shown in bold in the segment of the program shown below. This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @dbaker-aa , thank you for that note. However, I’m not going back. Software entities are supposed to move forward and add features, not remove them. This feature should exist in this action to become a more mature action.
Hello everyone!
This feature request will be implemented soon. I have a small ADR under review https://github.com/actions/setup-node/pull/299 . Proposed approach is a bit different from proposed in this issue - we would like allow specifying full path (directory path + filename) to lock file instead of
working_directory
(directory path only). We believe this approach will be a bit more generic and unblock more use-cases.