Concordium / concordium-smart-contract-tools

Tools for building, deploying, and interacting with smart contracts
Apache License 2.0
2 stars 8 forks source link

Improve error message when attempting to output the wasm module to a non_existing_folder #178

Open DOBEN opened 3 months ago

DOBEN commented 3 months ago

Task description The error message when attempting to output the wasm module to a non_existing_folder can be improved. It should specify the expected input format of the --out flag similar to the second command below.

cargo concordium build -o ./not_existing_folder/

    Finished release [optimized] target(s) in 0.00s
Error: Could not build smart contract.

Caused by:
    0: Unable to write final module.
    1: Is a directory (os error 21)

Executing the same command with an existing folder (but without a file name) gives a good error, specifying the expected format.

cargo concordium build -o ./existing_folder/
Error: Could not build smart contract.

Caused by:
    The `--out` flag requires a path and a filename (expected input: `./my/path/my_smart_contract.wasm.v1`)