On Tue, 22 May 2012 12:50:39 -0500 Nick Anderson <n...@cmdln.org> wrote:
NA> On 05/21/2012 02:51 PM, Ted Zlatanov wrote: >> Nick, see if you can duplicate the bug on your side and I'll open the >> ticket. No rush, I have the fix above in place. NA> I tried to use it manually and none of the variables seem to expand. I NA> have not tried with cfsketch yet. NA> looks like all the [] are missing in my clone update. NA> R: VCS is $(main.repovcs), origin $(main.repoorigin), branch NA> $(main.repobranch), target path $(main.repopath) NA> R: Sorry, the requested VCS $(main.repovcs) is not handled yet. NA> bundle agent main { NA> vars: NA> "repo[path]" string => "/tmp/test2/test3/git_freshclone"; NA> "repo[origin]" string => "git://github.com/nickanderson/copbl.git"; NA> "repo[branch]" string => "master"; NA> "repo[bundle_home]" string => NA> "/home/cmdln/.cfagent/inputs/sketches/vcs_freshclone"; NA> # TODO: provide some way to selectivly contain the executing user NA> methods: NA> "any" usebundle => vcs_freshclone("main.repo"); NA> } You want "prefixVAR" instead of "prefix[VAR]". In other words, we're passing a namespace prefix, not an array name, so all your variables are named "main.repoVAR" (assuming you pass the prefix like that, although I think "main.repo_" would be a more legible prefix). Ted _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine