File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
nix-script-directives/src Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,8 @@ impl Directives {
139
139
Ok ( ( ) )
140
140
}
141
141
142
- pub fn maybe_override_interpreter ( & mut self , maybe_new : & Option < String > ) {
143
- if maybe_new. is_some ( ) {
144
- maybe_new. clone_into ( & mut self . interpreter )
145
- }
142
+ pub fn override_interpreter ( & mut self , interpreter : & str ) {
143
+ self . interpreter = Some ( interpreter. to_owned ( ) ) ;
146
144
}
147
145
148
146
pub fn merge_runtime_inputs ( & mut self , new : & [ String ] ) -> Result < ( ) > {
Original file line number Diff line number Diff line change @@ -177,7 +177,9 @@ impl Opts {
177
177
directives
178
178
. merge_build_inputs ( & self . build_inputs )
179
179
. context ( "could not add build inputs provided on the command line" ) ?;
180
- directives. maybe_override_interpreter ( & self . interpreter ) ;
180
+ if let Some ( interpreter) = & self . interpreter {
181
+ directives. override_interpreter ( interpreter)
182
+ }
181
183
directives
182
184
. merge_runtime_inputs ( & self . runtime_inputs )
183
185
. context ( "could not add runtime inputs provided on the command line" ) ?;
You can’t perform that action at this time.
0 commit comments