Commit Graph

2 Commits

Author SHA1 Message Date
Yong Tang 6f7e8d1d7f Use `filepath.Clean` in `normaliseWorkdir` for windows
As is seem in the comment of `normaliseWorkdir` for windows:
```
...
	//	WORKDIR c:\\foo                 --> C:\foo
	//	WORKDIR \\foo                   --> C:\foo
...
```

However, this is not the case in the current implementation because
`filepath.FromSlash` is used and `FromSlash` does not replace multiple
separator with a single one (`file.Clean` does).
So `normaliseWorkdir` does not truly normalize workdir.

This fix changes the implementation of `normaliseWorkdir` and use
`filepath.Clean` instead of `filepath.FromSlash`.

Additional test cases have been added to the unit test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-31 13:27:05 -07:00
John Howard faab71701f Windows: Reduce CLI time, move some to unit tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-06 12:26:08 -07:00