Skip to content

Commit

Permalink
Merge pull request #3373 from mozilla/fix-softlinkstatic
Browse files Browse the repository at this point in the history
Fix softlinkstatic to actually create symlinks
  • Loading branch information
pmac committed Oct 1, 2015
2 parents 733330b + abb5afc commit 88fc953
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docker/softlinkstatic.py
Expand Up @@ -7,10 +7,11 @@
with open(STATIC) as static_fp:
static_files = json.load(static_fp)

for path in static_files['paths']:
full_path = os.path.join('./static', path)

try:
os.unlink(full_path)
except OSError:
pass
for orig, hashed in static_files['paths'].items():
if '?' in orig:
continue
orig_path = os.path.join('./static', orig)
hashed_filename = os.path.split(hashed)[1]
# no exception handling b/c we want to abort on OS errors here
os.unlink(orig_path)
os.symlink(hashed_filename, orig_path)

0 comments on commit 88fc953

Please sign in to comment.