vweevers/dotnet-bump

Path is not correct on mac OS

mymattcarroll opened this issue · 12 comments

Command:

dotnet-bump 1.0.0-beta.1 --dry-run

ENOENT: no such file or directory, open '/Users/me/project/Project\Project.csproj'

Is there a solution file (*.sln) in the current working directory that perhaps contains a path with a backwards slash?

Yes there is, I have updated to a forward slash and am now getting this error:

dotnet-bump 1.0.0-beta.1 --dry-run
ENOTDIR: not a directory, stat '/Users/me/project/Project/Project.csproj/.git

I am running the command from /Users/me/project

Yes there is, I have updated to a forward slash

OK. We can add path normalization to dotnet-bump if you want.

now getting this error: [..]

Can you run dotnet-bump 1.0.0-beta.1 --dry-run --verbose? Will give us a stack trace.

npx dotnet-bump 1.0.0-beta.1 --dry-run --verbose
npx: installed 110 in 9.178s
/Users/me/.npm/_npx/27403/lib/node_modules/dotnet-bump/cli.js:65
    throw err
    ^

[Error: ENOTDIR: not a directory, stat '/Users/me/project/Project/Project.csproj/.git'] {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'stat',
  path: '/Users/me/project/Project/Project.csproj/.git'
}

Hm, that stack trace is too short. Would it be possible for you to provide a (stripped-down) repository, so I can reproduce?

Ill try and put something together this week.

cd /Users/me/sources
git clone git@github.com:mymattcarroll/dotnet-bump-test.git
cd dotnet-bump-test
npm install --global dotnet-bump
dotnet-bump 1.1.1 --verbose

Output:

/Users/me/.npm-packages/lib/node_modules/dotnet-bump/cli.js:65
    throw err
    ^

[Error: ENOTDIR: not a directory, stat '/Users/me/sources/dotnet-bump-test/project.csproj/.git'] {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'stat',
  path: '/Users/me/sources/dotnet-bump-test/project.csproj/.git'
}

Excellent, thanks! Will have a look later this week.

Which node version do you have?

Node v14.15.1
NPM v6.14.11

ENOTDIR: not a directory, stat '/Users/me/project/Project/Project.csproj/.git

I'm getting essentially the same error when trying to run this on a Ubuntu host as part of a github action

Fixed in 1.5.0