xorpaul / g10k

my r10k fork in Go
Apache License 2.0
125 stars 50 forks source link

parameter -branch does not work with module link #137

Closed jlusiardi closed 5 years ago

jlusiardi commented 5 years ago

Hello Andreas,

In my Puppetfile there is a module:

mod 'XXX',
  :git => 'https://*********',
  :link => 'true',
  :fallback => 'master'

If I execute g10k -puppetfile Puppetfile -maxworker 1 -validate -verbose -branch master I receive an error:


resolvePuppetfile(): found module XXX with module link mode enabled and g10k in Puppetfile mode which is not supported, as g10k can not detect the environment branch of the Puppetfile. You can explicitly set the module link branch you want to use in Puppetfile mode by setting the environment variable 'g10k_branch' or using the -branch parameter```
I assume, the parameter `-branch` is not used here.

Using `g10k_branch=master` works like a charm though.

Regards
Joachim
xorpaul commented 5 years ago

The problem is that the -puppetfile parameter does not take an argument and that (presumably) did cause the flag golang library to ignore the rest of your parameters, including -branch. Using g10k -puppetfile -maxworker 1 -validate -verbose -branch master does work as expected.