[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/376: Ugly hack to allow --argstr values starting with a dash
From: |
Ludovic Courtès |
Subject: |
04/376: Ugly hack to allow --argstr values starting with a dash |
Date: |
Wed, 28 Jan 2015 22:03:39 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 0321ef9bb261958fe4d63210e9a9d3350737ef18
Author: Eelco Dolstra <address@hidden>
Date: Fri May 23 14:43:55 2014 +0200
Ugly hack to allow --argstr values starting with a dash
Fixes #265.
---
src/libmain/shared.cc | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index a390654..1426344 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -220,6 +220,13 @@ static void initAndRun(int argc, char * * argv)
string value = *i;
settings.set(name, value);
}
+ else if (arg == "--arg" || arg == "--argstr") {
+ remaining.push_back(arg);
+ ++i; if (i == args.end()) throw UsageError(format("`%1%' requires
two arguments") % arg);
+ remaining.push_back(*i);
+ ++i; if (i == args.end()) throw UsageError(format("`%1%' requires
two arguments") % arg);
+ remaining.push_back(*i);
+ }
else remaining.push_back(arg);
}
- tag 1.8 created (now c238405), Ludovic Courtès, 2015/01/28
- 01/376: Provide a more useful error message when a dynamic attr lookup fails, Ludovic Courtès, 2015/01/28
- 05/376: Shut up some signedness warnings, Ludovic Courtès, 2015/01/28
- 04/376: Ugly hack to allow --argstr values starting with a dash,
Ludovic Courtès <=
- 06/376: Add primop ‘scopedImport’, Ludovic Courtès, 2015/01/28
- 08/376: Ensure that -I flags get included in nixPath, Ludovic Courtès, 2015/01/28
- 11/376: Rephrase @ operator description, Ludovic Courtès, 2015/01/28
- 12/376: dev-shell is a bash script, not sh, Ludovic Courtès, 2015/01/28
- 09/376: Make the Nix search path declarative, Ludovic Courtès, 2015/01/28
- 03/376: Disable parallel.sh test, Ludovic Courtès, 2015/01/28
- 10/376: Remove ExprBuiltin, Ludovic Courtès, 2015/01/28
- 02/376: nix-store -l: Fetch build logs from the Internet, Ludovic Courtès, 2015/01/28
- 13/376: nix-build: --add-root also takes 1 parameter, Ludovic Courtès, 2015/01/28
- 07/376: Add constant ‘nixPath’, Ludovic Courtès, 2015/01/28