xorpaul/g10k

:local parameter isn't accepting boolean

Closed this issue · 5 comments

(Just cosmetic's ;))

root@mbaur-g10k:~# cat Puppetfile
mod 'external', # Ensure external folder isn't purged by g10k
  :local        => true,
  :install_path => 'modules'
root@mbaur-g10k:~# ./g10k -puppetfile
Error: Can not convert local parameter value true,:install_path =>  of module external to boolean. In ./Puppetfile line: mod 'external', :local        => true,:install_path => 'modules'
root@mbaur-g10k:~# sed -i "s,true,'true',g" Puppetfile
root@mbaur-g10k:~# ./g10k -puppetfile
Synced ./Puppetfile with 0 git repositories and 0 Forge modules in 0.0s with git (0.0s sync, I/O 0.0s) and Forge (0.0s query+download, I/O 0.0s) using 50 resolv and 20 extract workers

The :local parameter should accept a Boolean value as it seems to be kind of odd to quote it.

I'm preparing a fix for this, but what exactly are you trying to achieve with the :install_path parameter?

g10k only purges unmanaged directories in the moduledir configured directory, which is by default modules.

So using:

mod 'external',
  :local => true

would preserve a modules/external/ folder.

moduledir 'external_modules'
mod 'external',
  :local => true

would preserve a external_modules/external/ folder.

Trying to do something like this:

mod 'external',
  :local => true,
  :install_path => 'foobar/external'

is unnecessary, because g10k does never purge unmanaged folders outside the the moduledir

Oh, i wasn't aware of this. I just reused our r10k configuration :)

Ah, I see.

The only use case I can think of is something like this:

mod 'external',
  :local => true,
  :install_path => 'foobar/external'

with foobar/external not being in the control repository branch, but somehow copied there by hand after the initial g10k run and should stay there even when the control repository branch was modified.

And I'm not sure if I really want to support such behavior anyway 😉

Should also be fixed with v0.4.4

Looks good, thanks! :)