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

npx aegir check-project fails to recognize projectDir correctly #1054

Closed
SgtPooki opened this issue Aug 23, 2022 · 1 comment · Fixed by #1055
Closed

npx aegir check-project fails to recognize projectDir correctly #1054

SgtPooki opened this issue Aug 23, 2022 · 1 comment · Fixed by #1055
Labels

Comments

@SgtPooki
Copy link
Member

SgtPooki commented Aug 23, 2022

npm info aegir | head -n 2

aegir@37.5.1 | Apache-2.0 OR MIT | deps: 86 | versions: 233
╰─ ✔ ❯ npx aegir -d check-project
[16:22:17] check project [started]
process.argv:  [
  '/Users/sgtpooki/.asdf/installs/nodejs/16.16.0/bin/node',
  '/Users/sgtpooki/code/work/protocol.ai/ipfs/js-kubo-rpc-client/node_modules/.bin/aegir',
  '-d',
  'check-project'
]
projectDir:  check-project
╰─ ✘ 1 ❯ npx aegir check-project -d
[16:08:14] check project [started]
projectDir:  -d
prompt: branchName:  (master)
prompt: repoUrl:
branchName, repoUrl:  master
[16:08:17] check project [failed]
[16:08:17] → -d/package.json: ENOENT: no such file or directory, open '-d/package.json'

 Error: -d/package.json: ENOENT: no such file or directory, open '-d/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at Object.readFileSync (/Users/sgtpooki/code/work/protocol.ai/ipfs/js-kubo-rpc-client/node_modules/jsonfile/index.js:50:22)
    at Task.task (file:///Users/sgtpooki/code/work/protocol.ai/ipfs/js-kubo-rpc-client/node_modules/aegir/src/check-project/index.js:395:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '-d/package.json',
  context: {
    _: [ 'check-project' ],
    d: true,
    debug: true,
    '$0': 'aegir',
    fileConfig: {
      debug: false,
      test: [Object],
      build: [Object],
      lint: [Object],
      docs: [Object],
      ts: [Object],
      release: [Object],
      dependencyCheck: [Object]
    }
  }
}

I believe

const projectDir = process.argv[3] || process.cwd()

is at fault

SgtPooki added a commit that referenced this issue Aug 23, 2022
achingbrain added a commit that referenced this issue Aug 30, 2022
fixes #1054

Co-authored-by: Alex Potsides <alex@achingbrain.net>
github-actions bot pushed a commit that referenced this issue Aug 30, 2022
## [37.5.2](v37.5.1...v37.5.2) (2022-08-30)

### Bug Fixes

* check-project uses correct projectDir ([#1055](#1055)) ([297ac8f](297ac8f)), closes [#1054](#1054)
* correct link to issues page for ipfs readmes ([#1049](#1049)) ([b3578e8](b3578e8))

### Dependencies

* bump @electron/get from 1.14.1 to 2.0.0 ([#1038](#1038)) ([d3fa53f](d3fa53f))
* bump strip-json-comments from 4.0.0 to 5.0.0 ([#1023](#1023)) ([aa14ef9](aa14ef9))
* bump update-notifier from 5.1.0 to 6.0.2 ([#1013](#1013)) ([3465038](3465038))
* **dev:** bump electron from 19.0.14 to 20.1.0 ([#1058](#1058)) ([b0cb84f](b0cb84f))
@github-actions
Copy link

🎉 This issue has been resolved in version 37.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

1 participant