oxidecomputer / oxidecomputer/humility

`humility exec` doesn't seem to like (single) quotes in commands

Open
#536 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:bug: bug :busts_in_silhouette: user facing :computer: console ui
Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

This is Not A Big Deal (as it can be fixed by removing the quotes), but:

eliza@tereshkova ~ $ humility -t sn17 exec --list
NAME           COMMAND
console        /bin/sh -c "sp3-uart /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_BG00RVDP-if00-port0"
power.off      humility -t sn17 hiffy -c Sequencer.set_state -a state=A2
power.on       humility -t sn17 hiffy -c Sequencer.set_state -a state=A0
power.state    humility -t sn17 hiffy -c 'Sequencer.get_state'

eliza@tereshkova ~ $ humility -t sn17 exec power.state
humility: sn17 power.state: executing: 'humility -t sn17 hiffy -c 'Sequencer.get_state'' ...
humility: attached to 0483:3754:003200124741500820383733 via ST-Link V3
humility hiffy failed: interface 'Sequencer not found

Stack backtrace:
   0: humility_idol::IdolOperation::new
   1: humility_cmd_hiffy::hiffy
   2: humility_cmd::attach
   3: humility::cmd::subcommand
   4: humility::main
   5: std::sys::backtrace::__rust_begin_short_backtrace
   6: std::rt::lang_start::{{closure}}
   7: std::rt::lang_start_internal
   8: main
   9: __libc_start_call_main
  10: __libc_start_main_alias_2
  11: _start
humility: sn17 power.state: done (status code 1)

I had gotten in the habit of always single-quoting arguments to humility hiffy commands, so I was a bit surprised that it doesn't work in the environment file.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the humility exec command and the environment-file command parsing, then reproduce the shown power.state example with its single-quoted argument. Done means quoted commands from the environment file execute without stripping or duplicating the quotes, while the existing unquoted commands continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.