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
8b728794
Commit
8b728794
authored
Jun 20, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default cache to "packer_cache" in CWD
parent
cea6f90f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
packer.go
packer.go
+10
-8
No files found.
packer.go
View file @
8b728794
...
...
@@ -36,16 +36,18 @@ func main() {
defer
plugin
.
CleanupClients
()
var
cache
packer
.
Cache
if
cacheDir
:=
os
.
Getenv
(
"PACKER_CACHE_DIR"
);
cacheDir
!=
""
{
cacheDir
:=
os
.
Getenv
(
"PACKER_CACHE_DIR"
)
if
cacheDir
==
""
{
cacheDir
=
"packer_cache"
}
if
err
:=
os
.
MkdirAll
(
cacheDir
,
0755
);
err
!=
nil
{
fmt
.
Fprintf
(
os
.
Stderr
,
"Error preparing cache directory:
\n\n
%s
\n
"
,
err
)
os
.
Exit
(
1
)
}
log
.
Printf
(
"Setting cache directory: %s"
,
cacheDir
)
cache
=
&
packer
.
FileCache
{
CacheDir
:
cacheDir
}
}
cache
:=
&
packer
.
FileCache
{
CacheDir
:
cacheDir
}
envConfig
:=
packer
.
DefaultEnvironmentConfig
()
envConfig
.
Cache
=
cache
...
...
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