Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Migrations -f argument is ignored #886

Closed
craigwilliams84 opened this issue Apr 4, 2018 · 7 comments
Closed

Migrations -f argument is ignored #886

craigwilliams84 opened this issue Apr 4, 2018 · 7 comments

Comments

@craigwilliams84
Copy link

Issue

Migrations -f argument is ignored (works in 4.1.3 but not 4.1.4/5)

Steps to Reproduce

  • Run truffle migrate -f 2 in a project with multiple migrations files.

Expected Behavior

Only migration script 2 should be run.

Actual Results

All migration scripts are run.

Environment

  • Operating System: MacOS 10.13.2
  • Ethereum client: ganache-cli 6.0.3
  • Truffle version (truffle version): 4.1.5
  • node version (node --version): 8.7.0
  • npm version (npm --version): 5.6.0
@cgewecke
Copy link
Contributor

cgewecke commented Apr 4, 2018

@craigwilliams84 Thanks for reporting. We made a change in 4.1.5 documented here. It must be causing this issue but it's not obvious how exactly.

Is your code public? Or could you add any information about your migrations to help clarify what's gone wrong here?

@craigwilliams84
Copy link
Author

craigwilliams84 commented Apr 5, 2018

The code isn't currently public, but I have created a simple dummy project that reproduces the issue.

https://github.com/craigwilliams84/truffle-test

@cgewecke
Copy link
Contributor

cgewecke commented Apr 5, 2018

@craigwilliams84 Have opened a PR fixing this.

Unfortunately I don't see a great interim workaround - a PR for 4.1.5 created a conflict in the way the options are interpreted and -f is currently only being parsed as a boolean.

Thanks so much for reporting and for providing a reproduction case.

@craigwilliams84
Copy link
Author

No problem at all, thanks for looking into it so quickly.

@gnidan
Copy link
Contributor

gnidan commented Apr 16, 2018

That linked PR been released in Truffle v4.1.6. Let us know if this solves the problem! Thanks!

@gnidan gnidan closed this as completed Apr 16, 2018
@fawrn
Copy link

fawrn commented Apr 19, 2018

truffle version
Truffle v4.1.6 (core: 4.1.6)
Solidity v0.4.21 (solc-js)
Same issue still ignoring

@cgewecke
Copy link
Contributor

@fawrn Have just tested 4.1.6 against the example @craigwilliams84 produced for this issue above and -f is working as expected. If you have a chance could you run that and a) see if it works on your machine, b) identify any differences between that case and yours?

I'm on OSX.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants