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

addons:open command does not work with sudo on windows #1506

Closed
KevinBrolly opened this issue May 6, 2020 · 0 comments
Closed

addons:open command does not work with sudo on windows #1506

KevinBrolly opened this issue May 6, 2020 · 0 comments

Comments

@KevinBrolly
Copy link
Contributor

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Currently upon running addons:open using sudo the following error is displayed:

ENOENT: no such file or directory, open 'C:\tmp\heroku-sso.html'

What is the expected behavior?

It is expected that the file would be found and the browser window successfully opens the selected addon.

I believe the reason for this issue is that the ssoPath defined here - https://github.com/heroku/cli/blob/master/packages/addons-v5/commands/addons/open.js#L12

'/tmp/heroku-sso.html' is not a valid path for temporary files in a windows system. The issue happens when we try to open this file and find it has not been created - https://github.com/heroku/cli/blob/master/packages/addons-v5/commands/addons/open.js#L61

We may benefit from using the os.tmpdir() node function to ensure that at the file is stored in a valid location on all supported platforms.

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

1 participant