Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions emsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,8 +1736,9 @@ def is_active(self):
debug_print(str(self) + ' is not active, because key="' + key + '" does not exist in .emscripten')
return False

# If running in embedded mode, all paths are stored dynamically relative to the emsdk root, so normalize those first.
dot_emscripten_key = dot_emscripten[key].replace("' + emsdk_path + '", emsdk_path())
# If running in embedded mode, all paths are stored dynamically relative
# to the emsdk root, so normalize those first.
dot_emscripten_key = dot_emscripten[key].replace("emsdk_path + '", "'" + emsdk_path())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this still looks weird to me even with the explanation from before... it's shifting a ' from the right to the left. That seems really surprising.

Can't this just replace ' emsdk_path ' (note the space before and after) with the path?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, we also want to replace the += part.

Old:

FOO = emsdk_path + "/some/path"

New:

FOO = "/the/actual/path/some/path"

I can probably come up with a cleaner way to do this overall, but for now this fixes the immediate breakage and I don't think its any nicer before of after this change, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see better now, thanks!

if dot_emscripten_key != value:
debug_print(str(self) + ' is not active, because key="' + key + '" has value "' + dot_emscripten_key + '" but should have value "' + value + '"')
return False
Expand Down