1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 04:18:00 +02:00

Fix nix shebang interaction with #8131 overhaul completions

This commit is contained in:
Robert Hensing 2023-10-23 18:38:54 +02:00 committed by tomberek
parent e91fd837ee
commit ffd414eb75
4 changed files with 25 additions and 29 deletions

View file

@ -24,24 +24,9 @@ class AddCompletions;
class Args
{
/**
* @brief The command's "working directory", but only set when top level.
*
* Use getCommandBaseDir() to get the directory regardless of whether this
* is a top-level command or subcommand.
*
* @see getCommandBaseDir()
*/
Path commandBaseDir = ".";
public:
/**
* Parse the command line with argv0, throwing a UsageError if something
goes wrong.
*/
void parseCmdline(const Strings & _cmdline, bool allowShebang);
/**
* Return a short one-line description of the command.
*/
@ -62,7 +47,7 @@ public:
*
* This only returns the correct value after parseCmdline() has run.
*/
Path getCommandBaseDir() const;
virtual Path getCommandBaseDir() const;
protected: