-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from chugsplash/sg/develop
fix(pg): fix BaseServiceV2 arg parsing bug in hardhat tasks
- Loading branch information
Showing
4 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@chugsplash/plugins': patch | ||
--- | ||
|
||
Fixes a bug where the BaseServiceV2 was erroring when parsing command line args from the Hardhat plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Removes all command line args in the `process.argv` array that begin with '--'. This is necessary | ||
* to prevent an error that occurs when running the executor from within a Hardhat plugin task. This | ||
* error occurs because the BaseServiceV2 (inherited by the executor) parses these command line | ||
* arguments and throws an error when it sees arguments that it does not recognize. | ||
*/ | ||
export const removeFlagsFromCommandLineArgs = (): void => { | ||
process.argv = process.argv.filter((arg) => !arg.startsWith('--')) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './hardhat' | ||
export * from './messages' | ||
export * from './env' |