Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix nits, merging to one statement
  • Loading branch information
yorkie committed Sep 3, 2017
commit f49c18c41c8897d436dd5407dc293a8cfec440fd
5 changes: 3 additions & 2 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def files(action):
if 'false' == variables.get('node_shared'):
if is_windows:
output_file += '.exe'
action([output_prefix + output_file], 'lib/' + output_file)
else:
if is_windows:
output_file += '.dll'
Expand All @@ -133,7 +132,9 @@ def files(action):
# in its source - see the _InstallableTargetInstallPath function.
if sys.platform != 'darwin':
output_prefix += 'lib.target/'
action([output_prefix + output_file], 'bin/' + output_file)

action([output_prefix + output_file], (
'bin/' if 'false' == variables.get('node_shared') else 'lib/') + output_file)
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.

Will be easier on the eyes when written as an if/else statement. That's also the commonest style in this file and will also let you keep it <= 80 columns.

Copy link
Copy Markdown
Contributor Author

@yorkie yorkie Sep 3, 2017

Choose a reason for hiding this comment

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

Like this?

if 'false' == variables.get('node_shared'):
  action([output_prefix + output_file], 'bin/' + output_file)
else:
  action([output_prefix + output_file], 'lib/' + output_file)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@yorkie that looks like what Ben was suggesting, could you update this branch with that code?


if 'true' == variables.get('node_use_dtrace'):
action(['out/Release/node.d'], 'lib/dtrace/node.d')
Expand Down