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
a380391b
Commit
a380391b
authored
Dec 06, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: allow files that don't exist to be URLs [GH-683]
parent
2dad0cdc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
CHANGELOG.md
CHANGELOG.md
+1
-0
common/config.go
common/config.go
+12
-12
No files found.
CHANGELOG.md
View file @
a380391b
...
...
@@ -11,6 +11,7 @@ BUG FIXES:
*
core: Don't change background color on CLI anymore, making things look
a tad nicer in some terminals.
*
core: multiple ISO URLs works properly in all builders. [GH-683]
*
builder/amazon/chroot: Block when obtaining file lock to allow
parallel builds. [GH-689]
*
builder/vmware: Cleanup of VMX keys works properly so cd-rom won't
...
...
common/config.go
View file @
a380391b
...
...
@@ -105,10 +105,9 @@ func DownloadableURL(original string) (string, error) {
url
.
Path
=
strings
.
Replace
(
url
.
Path
,
`\`
,
`/`
,
-
1
)
}
if
_
,
err
:=
os
.
Stat
(
url
.
Path
);
err
!=
nil
{
return
""
,
err
}
// Only do the filepath transformations if the file appears
// to actually exist.
if
_
,
err
:=
os
.
Stat
(
url
.
Path
);
err
==
nil
{
url
.
Path
,
err
=
filepath
.
Abs
(
url
.
Path
)
if
err
!=
nil
{
return
""
,
err
...
...
@@ -121,6 +120,7 @@ func DownloadableURL(original string) (string, error) {
url
.
Path
=
filepath
.
Clean
(
url
.
Path
)
}
}
// Make sure it is lowercased
url
.
Scheme
=
strings
.
ToLower
(
url
.
Scheme
)
...
...
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