Skip to content

Commit

Permalink
Bug 1458588 - Create objdir/tmp if it doesn't exist during mach run;r…
Browse files Browse the repository at this point in the history
…=ahal

This fixes `./mach run --temp-profile` after a clobber.

MozReview-Commit-ID: 7xoH5RCSpXx

--HG--
extra : rebase_source : b26f54b6ac4b0d9020fb803f9fb8c51ea51f511d
  • Loading branch information
bgrins committed May 2, 2018
1 parent 15c3ab5 commit e68a405
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/mozbuild/mozbuild/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,10 +898,14 @@ def run(self, params, remote, background, noprofile, disable_e10s,
for pref in prefs:
prefs[pref] = Preferences.cast(prefs[pref])

tmpdir = os.path.join(self.topobjdir, 'tmp')
if not os.path.exists(tmpdir):
os.makedirs(tmpdir)

if (temp_profile):
path = tempfile.mkdtemp(dir=os.path.join(self.topobjdir, 'tmp'), prefix='profile-')
path = tempfile.mkdtemp(dir=tmpdir, prefix='profile-')
else:
path = os.path.join(self.topobjdir, 'tmp', 'profile-default')
path = os.path.join(tmpdir, 'profile-default')

profile = Profile(path, preferences=prefs)
args.append('-profile')
Expand Down

0 comments on commit e68a405

Please sign in to comment.