Skip to content

Commit

Permalink
#7 - Options not defined in module aren't passed on
Browse files Browse the repository at this point in the history
  • Loading branch information
dasginganinja authored Sep 27, 2023
1 parent c9d90d4 commit d1e7dbf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ import (
)

func main() {
// Parse command-line flags
// Set up command-line flags
altRoot := flag.String("r", "", "Set an alternative Drupal root")
altRootLong := flag.String("root", "", "Set an alternative Drupal root (long form)")

// We need to pash ALL options to Drush, even those we don't set (thanks flag module :))
flag.CommandLine.ParseErrorsWhitelist = flag.ParseErrorsWhitelist{
UnknownFlags: true,
}

// Parse command-line flags
flag.Parse()

var drupalRoot string
Expand Down

0 comments on commit d1e7dbf

Please sign in to comment.