Skip to content

Commit

Permalink
Fix concatentation error on no args to ./mach rustc
Browse files Browse the repository at this point in the history
Since default argument to params is None, concatenating it with a
list will raise an error.  This behaviour prevents `./mach rustc`
to be called when system-rust is defined in .servobuild.

Currently it will only work when followed by an argument, i.e.
`./mach rustc -arg`.

Testing this patch: `./mach rustc` should not raise an error.
  • Loading branch information
andreastt committed Dec 8, 2014
1 parent 3383671 commit f716e8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/servo/devenv_commands.py
Expand Up @@ -48,6 +48,8 @@ def update_cargo(self, params):
'params', default=None, nargs='...',
help="Command-line arguments to be passed through to rustc")
def rustc(self, params):
if params is None:
params = []
return subprocess.call(["rustc"] + params, env=self.build_env())

@Command('rust-root',
Expand Down

5 comments on commit f716e8b

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging andreastt/servo/ato/concat_error_on_system_rust = f716e8b into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

andreastt/servo/ato/concat_error_on_system_rust = f716e8b merged ok, testing candidate = 35c13f0

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 35c13f0

Please sign in to comment.