Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

🐞 [Bug]: Starting up without an action always runs init which wipes any pre-existing configuratiuon #223

Open
2 of 4 tasks
jim-counter opened this issue Jul 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jim-counter
Copy link
Member

What happened?

If I run the Simple CLI without any command line parameter e.g. farm, init' or wipe with the expectation I will be offered the menu of actions, the init activity is automatically run without any user input which wipes any pre-existing configuration and means I have to enter it all again.

PS C:\Users\jimco\Desktop\Subspace Simple CLI> ."C:\\Users\\jimco\\Desktop\\Subspace Simple CLI\\subspace-cli-windows-x86_64-skylake-v0.5.1-alpha-2.exe"
 Please select an option below using arrow keys (or `j` and `k`):

   > init
    farm
    wipe
    info
    open logs directory



 ____             __                                              __  __          __                               __
/\  _`\          /\ \                                            /\ \/\ \        /\ \__                           /\ \
\ \,\L\_\  __  __\ \ \____    ____  _____      __      ___     __\ \ `\\ \     __\ \ ,_\  __  __  __    ___   _ __\ \ \/'\
 \/_\__ \ /\ \/\ \\ \ '__`\  /',__\/\ '__`\  /'__`\   /'___\ /'__`\ \ , ` \  /'__`\ \ \/ /\ \/\ \/\ \  / __`\/\`'__\ \ , <
   /\ \L\ \ \ \_\ \\ \ \L\ \/\__, `\ \ \L\ \/\ \L\.\_/\ \__//\  __/\ \ \`\ \/\  __/\ \ \_\ \ \_/ \_/ \/\ \L\ \ \ \/ \ \ \\`\
   \ `\____\ \____/ \ \_,__/\/\____/\ \ ,__/\ \__/.\_\ \____\ \____\\ \_\ \_\ \____\\ \__\\ \___x___/'\ \____/\ \_\  \ \_\ \_\
    \/_____/\/___/   \/___/  \/___/  \ \ \/  \/__/\/_/\/____/\/____/ \/_/\/_/\/____/ \/__/ \/__//__/   \/___/  \/_/   \/_/\/_/
                                      \ \_\
                                       \/_/

version: 0.5.1

Configuration creation process has started...
Do you have an existing farmer/reward address? [y/n]: y
Enter your farmer/reward address: st...
Enter your node name to be identified on the network(defaults to `jimco`, press enter to use the default): jc_windows_simple_cli
Specify a path for storing plot files (press enter to use the default: `"C:\\Users\\jimco\\AppData\\Roaming\\subspace-cli\\plots"`): e:\\subspace-simple-cli\\plots
Specify a path for storing node files (press enter to use the default: `"C:\\Users\\jimco\\AppData\\Roaming\\subspace-cli\\node"`): e:\\subspace-simple-cli\\node
Specify a plot size (defaults to `2.0 GB`, press enter to use the default): 10G
Specify the chain to farm. Available options are: [Gemini3e, Dev, DevNet].
 Defaults to `Gemini3e`, press enter to use the default:
Configuration has been generated at C:\Users\jimco\AppData\Roaming\subspace-cli
Ready for lift off! Run the follow command to begin:
`"C:\\Users\\jimco\\Desktop\\Subspace Simple CLI\\subspace-cli-windows-x86_64-skylake-v0.5.1-alpha-2.exe" farm`
PS C:\Users\jimco\Desktop\Subspace Simple CLI> ."C:\\Users\\jimco\\Desktop\\Subspace Simple CLI\\subspace-cli-windows-x86_64-skylake-v0.5.1-alpha-2.exe" farm
Starting node ...
Node started successfully!
 ◡  [00:08:17] 34% [██████████████████████████████████████▉                                                                           ] (19085/55956) 7.93bps, syncing, ETA: 01:17:26
PS C:\Users\jimco\Desktop\Subspace Simple CLI> .\subspace-cli-windows-x86_64-skylake-v0.5.1-alpha-2.exe
 Please select an option below using arrow keys (or `j` and `k`):

   > init
    farm
    wipe
    info
    open logs directory



 ____             __                                              __  __          __                               __
/\  _`\          /\ \                                            /\ \/\ \        /\ \__                           /\ \
\ \,\L\_\  __  __\ \ \____    ____  _____      __      ___     __\ \ `\\ \     __\ \ ,_\  __  __  __    ___   _ __\ \ \/'\
 \/_\__ \ /\ \/\ \\ \ '__`\  /',__\/\ '__`\  /'__`\   /'___\ /'__`\ \ , ` \  /'__`\ \ \/ /\ \/\ \/\ \  / __`\/\`'__\ \ , <
   /\ \L\ \ \ \_\ \\ \ \L\ \/\__, `\ \ \L\ \/\ \L\.\_/\ \__//\  __/\ \ \`\ \/\  __/\ \ \_\ \ \_/ \_/ \/\ \L\ \ \ \/ \ \ \\`\
   \ `\____\ \____/ \ \_,__/\/\____/\ \ ,__/\ \__/.\_\ \____\ \____\\ \_\ \_\ \____\\ \__\\ \___x___/'\ \____/\ \_\  \ \_\ \_\
    \/_____/\/___/   \/___/  \/___/  \ \ \/  \/__/\/_/\/____/\/____/ \/_/\/_/\/____/ \/__/ \/__//__/   \/___/  \/_/   \/_/\/_/
                                      \ \_\
                                       \/_/

version: 0.5.1

Configuration creation process has started...
Do you have an existing farmer/reward address? [y/n]:

Version

0.5.1

platform

  • linux
  • windows
  • macos

Expected behavior

The software should offer the menu and then await my input.

PS C:\Users\jimco\Desktop\Subspace Simple CLI> .\subspace-cli-windows-x86_64-skylake-v0.5.1-alpha-2.exe
 Please select an option below using arrow keys (or `j` and `k`):

   > init
    farm
    wipe
    info
    open logs directory

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jim-counter jim-counter added the bug Something isn't working label Jul 6, 2023
@clostao
Copy link

clostao commented Jan 3, 2024

Could be related with this issue: crossterm-rs/crossterm#797

In Windows crossterm since 0.26 (0.26.1 is our version) emits Release kind key events.

Hypothesis:

When a user executes the command without any arguments (pressing enter), the program starts and eventually the user releases the enter button and this event is interpreted as the user intending to select an option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants