Skip to content

task config does not report an error if it cannot write to .taskrc #3611

@echo-bravo-yahoo

Description

@echo-bravo-yahoo
~ ❯ task context define test project:personal
Are you sure you want to add 'context.test.read' with a value of 'project:personal'? (yes/no) y
Are you sure you want to add 'context.test.write' with a value of 'project:personal'? (yes/no) y
Context 'test' defined (read, write). Use 'task context test' to activate.
~ ❯ task context test
Context 'test' not found.
~ ❯ task context list | grep test
~ ❯ task context delete test
Do you want to delete context 'test'? (yes/no) y
Context 'test' not found.
~ ❯ task --version
3.1.0
~ ❯ task diag
task 3.1.0
   Platform: Darwin

Compiler
    Version: Apple LLVM 15.0.0 (clang-1500.3.9.4)
       Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
 Compliance: C++17

Build Features
      CMake: 3.30.2
    libuuid: libuuid + uuid_unparse_lower
 Build type: Release

Configuration
       File: /Users/.../.taskrc (found), 5192 bytes, mode 100644
       Data: /Users/.../.task (found), dir, mode 40755
         GC: Enabled
    $EDITOR: nvim
Hooks
     System: Disabled
   Location: /Users/.../.task/hooks
             (-none-)

Tests
   Terminal: 416x114
 Broken ref: Scanned 2814 tasks for broken references:
             No broken references found
~ ❯ vim ~/.taskrc
~ ❯ task context list | grep manualtest
manualtest         read  project:personal                                       no
~ ❯ task context delete manualtest
Do you want to delete context 'manualtest'? (yes/no) yes
Context 'manualtest' deleted.
~ ❯ task context list | grep manualtest
~ ❯ 

I don't appear to be able to create contexts in v3.1.0 from the CLI. Some other useful information:

  • I recently upgraded to taskwarrior v3
  • I'm using taskchampion-server to sync
  • I have many old-style contexts (read only) in my task rc and no new-style contexts
    • I actually can't find any migration docs - what sent me down this rabbit hole in the first place was wanting to migrate my contexts to the newer definition style

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions