Skip to content

description text within backticks is blindly executed #50

Open
@oskapt

Description

@oskapt

To report a bug...

  • What command(s) did you run?
    tasksh> start 34

  • What did you expect to happen?
    the task would start

  • What actually happened?
    the task started, and it reported that it had attempted to run sections of the description contained within backticks

tasksh> /rancher/
[task /rancher/]

ID Age Project  Tag        Description                                                                    Urg
34 9d  Personal IT ansible change `server` group to `rancher_server` and clean up old use of              1.95
                           `rancher_server`

1 task
There are local changes.  Sync required.
tasksh> start 34
[task start 34]
sh: server: command not found
sh: rancher_server: command not found
sh: rancher_server: command not found
Starting task f275c6e1 'change `server` group to `rancher_server` and clean up old use of `rancher_server`'.
Started 1 task.
Tracking IT Personal ansible "change  group to  and clean up old use of"
  Started 2018-05-21T12:22:00
  Current                  00
  Total               0:00:00
You have more urgent tasks.
Project 'Personal' is 51% complete (53 of 109 tasks remaining).
tasksh> done 34
[task done 34]
sh: server: command not found
sh: rancher_server: command not found
sh: rancher_server: command not found
Completed task f275c6e1 'change `server` group to `rancher_server` and clean up old use of `rancher_server`'.
Completed 1 task.
Recorded IT Personal ansible "change  group to  and clean up old use of"
  Started 2018-05-21T12:22:00
  Ended                 48:40
  Total               0:26:40
You have more urgent tasks.
The project 'Personal' has changed.  Project 'Personal' is 52% complete (52 of 109 tasks remaining).

Details

I write everything in markdown, so it's common for me to use backticks in descriptions to block out words/commands/code. I've only been using tasksh for one day, and today it did the stuff I've detailed above. The easy answer is to say, "don't use backticks," but I think that it's worth reporting that anything in backticks is blindly executed when starting the task.

In a worst-case scenario, this means that a task with a description like make sure that `rm -fr ~` doesn't actually delete my home directory will do nasty and unexpected things.

Some of the output is from Timewarrior, which had the backticked "commands" removed before time tracking started. I don't know if this is a problem specifically within tasksh, Taskwarrior or Timewarrior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions