ipfs-shipyard / ipfs-deploy

Zero-Config CLI to Deploy Static Websites to IPFS
Other
1.16k stars 122 forks source link

Warn user when multiple paths exist #112

Closed TripleSpeeder closed 3 years ago

TripleSpeeder commented 4 years ago

A standard create-react-app has both a "public" and "build" folder. The build folder is the one containing the actual build, while the "public" folder should be ignored.

Gguess-path.js just returns the first found matching folder, so you end up deploying the wrong "public" folder.

I think one possibility would be to just bail out when more than one candidate is found with an according message to the user. Something like "Found more than one path candidate to deploy, please specify the path to use.

hacdias commented 3 years ago

@TripleSpeeder thanks for the suggestion. We now give an explicit error message and exit when we find more than one guessable path. This way we force users to specify it, leaving no doubts! I'm closing this then!