Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Clean path before validating app #767

Merged

Conversation

zappy-shu
Copy link
Contributor

- What I did

Clean the App name while getting the directory path so that pathing works with trailing slashes on both Unix and Windows machines

- How I did it

Use filepath.Clean() to clean the path arg in docker app validate so that the path is correctly tested on both Unix and Windows machines.

- How to verify it

On Windows run

.\bin\docker-app-windows.exe app validate .\examples\cnab-simple\hello.dockerapp\

The command should succeed

- Description for the changelog

docker app validate will no longer fail on Windows when the supplied App path has a trailing backslash

- A picture of a cute animal (not mandatory)

kitten-2019-11-12

Use filepath.Clean() to clean the path arg in docker app validate so
that the path is correctly tested on both Unix and Windows machines.

Signed-off-by: Nick Adcock <[email protected]>
Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Nov 26, 2019

Codecov Report

Merging #767 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #767      +/-   ##
==========================================
- Coverage   69.66%   69.63%   -0.04%     
==========================================
  Files          64       64              
  Lines        3597     3567      -30     
==========================================
- Hits         2506     2484      -22     
+ Misses        760      756       -4     
+ Partials      331      327       -4
Impacted Files Coverage Δ
internal/names.go 100% <100%> (ø) ⬆️
internal/commands/image/rm.go 58.62% <0%> (-3.88%) ⬇️
internal/store/bundle.go 76.41% <0%> (-0.17%) ⬇️
types/parameters/parameters.go 96.82% <0%> (+3.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a49da4...d1d0455. Read the comment docs.

@rumpl rumpl merged commit e3a9aed into docker:master Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants