caprover / caprover-cli

Command Line Interface for https://github.com/caprover/caprover
72 stars 39 forks source link

-t option is used with tarFile and appToken #126

Open fu-sen opened 2 years ago

fu-sen commented 2 years ago

Got this when I looked at caprover deploy --help.

  -t, --tarFile <value>           tar file to be uploaded, must contain captain-definition file (env: CAPROVER_TAR_FILE)
  -i, --imageName <value>         image name to be deployed, it should either exist on server, or it has to be public, or on a private repository that CapRover has access to (env: CAPROVER_IMAGE_NAME)
  -t, --appToken <value>          app Token (env: CAPROVER_APP_TOKEN)

The -t option duplicates --tarFile and --appToken. This source part

https://github.com/caprover/caprover-cli/blob/master/src/commands/deploy.ts#L179-L204

-t now works for tarFile, since tarFile is at the top of the source. Token does not work with -t, --appToken is always required. (This is the current workaround)

Which single letter option should be replaced.

edson-gaspar commented 8 months ago

This error caused me to lose almost a day of work, and I was on the verge of giving up on using this tool.