Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Truffle invocation conflict on Windows #179

Merged
merged 1 commit into from
Feb 25, 2019
Merged

Conversation

Xenomega
Copy link
Member

@Xenomega Xenomega commented Feb 25, 2019

This pull request aims to resolve #173 . The truffle compile command invoked through slither will fail on Windows due to naming conflicts. On Windows, .JS is an executable extension by default (see the PATHEXT environment variable), which confuses windows into invoking truffle.js instead of truffle.cmd.

Truffle's own website suggests a few fixes:
https://truffleframework.com/docs/truffle/reference/configuration#resolving-naming-conflicts-on-windows

The only fix which does not require the user modifying their environment is to explicitly invoke truffle.cmd. This seems simplistic and non-problematic, so I have added a switch to __main__.py which invokes truffle.cmd if on Windows, otherwise simply truffle is invoked.

This has fixed truffle invocation on my Windows system.

@montyly
Copy link
Member

montyly commented Feb 25, 2019

As we are fixing Windows support: if a truffle version is specified in package.json, slither will run npx [email protected] compile, does that work correctly on Windows?

@montyly montyly merged commit 6ca0cc1 into dev Feb 25, 2019
@montyly montyly deleted the dev-win-truffle-invoke branch April 5, 2019 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants