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

Don't add cwd if a full path is already passed #68

Closed
florian-berger opened this issue Jul 4, 2023 · 1 comment · Fixed by #69
Closed

Don't add cwd if a full path is already passed #68

florian-berger opened this issue Jul 4, 2023 · 1 comment · Fixed by #69
Labels

Comments

@florian-berger
Copy link
Contributor

We manage our source code in Azure DevOps and also use its pipelines of it for releasing new versions of our Chrome application.

Now, we have a problem with this chrome-webstore-upload-cli package. We are using version 2.0.0 of it and passing a whole path as --source parameter (D:\a\1\Extension-Upload\Chrome.zip).
But when executing the script, I get the following output:

- Fetching token
- Uploading Chrome.zip
Error
RequestError: ENOENT: no such file or directory, open 'D:\a\1\s\D:\a\1\Extension-Upload\Chrome.zip'
    at Request._destroy (C:\npm\prefix\node_modules\chrome-webstore-upload-cli\node_modules\got\dist\source\core\index.js:1386:21)
    at _destroy (node:internal/streams/destroy:102:25)
    at Request.destroy (node:internal/streams/destroy:64:5)
    at C:\npm\prefix\node_modules\chrome-webstore-upload-cli\node_modules\got\dist\source\core\index.js:354:26
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ENOENT',
  timings: undefined
}

A look at the wrapper.js file revealed that process.cwd() is always combined with the passed path. This shouldn't be done when a full path is already specified.

@fregante fregante added the bug label Jul 4, 2023
@fregante
Copy link
Owner

fregante commented Jul 4, 2023

Good point, I think join should be replaced with resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants