Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
6fc89e95
Commit
6fc89e95
authored
Sep 18, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-processor/vagrant: set output path always in a new raw
parent
2e9dbb72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
post-processor/vagrant/post-processor.go
post-processor/vagrant/post-processor.go
+7
-3
No files found.
post-processor/vagrant/post-processor.go
View file @
6fc89e95
...
...
@@ -45,10 +45,8 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
tpl
.
UserVars
=
p
.
config
.
PackerUserVars
// Defaults
ppExtraConfig
:=
make
(
map
[
string
]
interface
{})
if
p
.
config
.
OutputPath
==
""
{
p
.
config
.
OutputPath
=
"packer_{{ .BuildName }}_{{.Provider}}.box"
ppExtraConfig
[
"output"
]
=
p
.
config
.
OutputPath
}
// Accumulate any errors
...
...
@@ -58,10 +56,16 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
errs
,
fmt
.
Errorf
(
"Error parsing output template: %s"
,
err
))
}
// Store extra configuration we'll send to each post-processor type
ppExtraConfig
:=
make
(
map
[
string
]
interface
{})
ppExtraConfig
[
"output"
]
=
p
.
config
.
OutputPath
// Store the extra configuration for post-processors
p
.
rawConfigs
=
append
(
p
.
rawConfigs
,
ppExtraConfig
)
// TODO(mitchellh): Properly handle multiple raw configs
// TODO(mitchellh): Properly handle multiple raw configs. This isn't
// very pressing at the moment because at the time of this comment
// only the first member of raws can contain the actual type-overrides.
var
mapConfig
map
[
string
]
interface
{}
if
err
:=
mapstructure
.
Decode
(
raws
[
0
],
&
mapConfig
);
err
!=
nil
{
errs
=
packer
.
MultiErrorAppend
(
errs
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment