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
b30a1303
Commit
b30a1303
authored
Jul 25, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #218 from jstamerj/master
builder/virtualbox, communicator/ssh: fixes for running on windows
parents
b3f8a22c
4fae365f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
builder/virtualbox/driver.go
builder/virtualbox/driver.go
+3
-0
communicator/ssh/communicator.go
communicator/ssh/communicator.go
+5
-0
No files found.
builder/virtualbox/driver.go
View file @
b30a1303
...
...
@@ -50,6 +50,9 @@ func (d *VBox42Driver) IsRunning(name string) (bool, error) {
}
for
_
,
line
:=
range
strings
.
Split
(
stdout
.
String
(),
"
\n
"
)
{
// Need to trim off CR character when running in windows
line
=
strings
.
TrimRight
(
line
,
"
\r
"
);
if
line
==
`VMState="running"`
{
return
true
,
nil
}
...
...
communicator/ssh/communicator.go
View file @
b30a1303
...
...
@@ -130,6 +130,11 @@ func (c *comm) Upload(path string, input io.Reader) error {
target_dir
:=
filepath
.
Dir
(
path
)
target_file
:=
filepath
.
Base
(
path
)
// On windows, filepath.Dir uses backslash seperators (ie. "\tmp").
// This does not work when the target host is unix. Switch to forward slash
// which works for unix and windows
target_dir
=
filepath
.
ToSlash
(
target_dir
)
// Start the sink mode on the other side
// TODO(mitchellh): There are probably issues with shell escaping the path
log
.
Println
(
"Starting remote scp process in sink mode"
)
...
...
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