Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

CLI update command does not allow solutions or project files as path argument #1148

Open
1 of 7 tasks
chuseman opened this issue Oct 27, 2021 · 1 comment
Open
1 of 7 tasks

Comments

@chuseman
Copy link

🐛 Bug Report

I'm unable to run nukeeper update with a solution file as the path argument.

Expected behavior

According to nukeeper update --help, the Path argument is:

The path to a .sln or project file, or to a directory containing a .NET solution/project. If none is specified, the current directory will be used.

So I'd expect that supplying a path to a solution or project file would update just that solution/project dependencies.

Reproduction steps

Invoke nukeeper update Project.sln (assuming Project.sln exists) and you'll get the error:

Path 'Project.sln' was not found

Configuration

Version: 0.35.0

Platform if applicable:

  • 🛠️ NuKeeper CLI
  • ✨ GitHub
  • 🤖 AzureDevops
  • 🏁 Bitbucket
  • 🌎 Gitlab
  • 📺 Gitea
  • 🐳 Docker
@chuseman
Copy link
Author

I believe PopulateSettings is blocking it in LocalNuKeeperCommand:

if (!string.IsNullOrWhiteSpace(Path) && !Directory.Exists(Path))
{
return ValidationResult.Failure($"Path '{Path}' was not found");
}

I've tried fixing that specific instance to check for either Directory.Exists() or File.Exists() but then it fails later on. I'm hoping somebody more familiar with the project can shine some light on this (is the documentation just wrong?)

FWIW, this also affects nukeeper inspect but only when you don't supply other parameters (like -m 1). That's likely a separate bug where the path is just discarded.

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

No branches or pull requests

1 participant