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

Fix: Creating a service file with a custom name falls back to the package.name when package.json has "files" #108

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

matt-ahmet-bbc
Copy link
Contributor

@matt-ahmet-bbc matt-ahmet-bbc commented Mar 6, 2024

Given we call speculate with --name argument, we see that it falls back to package.json's name when the package.json has also files defined.

// Example package.json
{
   "name": "foo",
   "files": ['path/1', 'path/2'],
}

npx speculate --name=penguin
> Error: ENOENT: no such file or directory, lstat '/Users/.../foo.service'

When we don't have "files" defined in our package.json, this works as expected and use the custom name defined.

@matt-ahmet-bbc
Copy link
Contributor Author

matt-ahmet-bbc commented Mar 8, 2024

Fixes #89 #78

@onlyonehas onlyonehas merged commit 7708579 into bbc:master Mar 12, 2024
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 this pull request may close these issues.

2 participants