File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -176,9 +176,11 @@ def cli_exec(
176
176
multiple = True ,
177
177
help = "Options to pass to Conan for virtualrunenv generation" ,
178
178
)
179
+ @click .argument ("shell_args" , nargs = - 1 )
179
180
@click .pass_obj
180
181
def cli_shell (
181
182
opt ,
183
+ shell_args : List [str ],
182
184
profile : str ,
183
185
profile_path : str ,
184
186
preserve_env : bool ,
@@ -193,7 +195,7 @@ def cli_shell(
193
195
engine .conan_options = conan_option
194
196
195
197
# Replace process with shell.
196
- engine .shell (use_cache = cache )
198
+ engine .shell (shell_args , use_cache = cache )
197
199
198
200
199
201
# _________________________________________________________________________
Original file line number Diff line number Diff line change @@ -159,7 +159,9 @@ def init_from_str(self, data: str) -> None:
159
159
self ._data [kv [0 ]] = kv [1 ]
160
160
except IndexError :
161
161
logging .error (
162
- "Error: cannot interpret environment key-value pair:" , line
162
+ "Error: cannot interpret environment key-value pair: {}" .format (
163
+ line
164
+ )
163
165
)
164
166
165
167
def __delitem__ (self , key : str ):
@@ -509,6 +511,7 @@ def clean(self) -> None:
509
511
510
512
def shell (
511
513
self ,
514
+ arguments : List [str ] = None ,
512
515
use_cache : bool = False ,
513
516
) -> None :
514
517
"""Launch a SHELL with the environment variables adjusted."""
@@ -546,7 +549,10 @@ def shell(
546
549
547
550
# Replace this process with the SHELL now.
548
551
sys .stdout .flush ()
549
- os .execvpe (shell , [shell ], env .as_dict ())
552
+ cmd = [shell ]
553
+ if arguments is not None :
554
+ cmd .extend (arguments )
555
+ os .execvpe (shell , cmd , env .as_dict ())
550
556
551
557
def exec (
552
558
self ,
You can’t perform that action at this time.
0 commit comments