fix(v0.4.1): route all workspace commands through SearchRoots
Every resolver, lister, and most-recent caller now passes config.SearchRoots() so CTASK_PROJECT_ROOT is searched alongside CTASK_ROOT. Commands use ws.Root when rendering relative paths or session env vars so displays and CTASK_ROOT exports are correct for workspaces living under CTASK_PROJECT_ROOT. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -23,8 +23,8 @@ func init() {
|
||||
}
|
||||
|
||||
func runArchive(cmd *cobra.Command, args []string) error {
|
||||
root := config.ResolveRoot()
|
||||
ws := resolveOne(root, args[0], false)
|
||||
roots := config.SearchRoots()
|
||||
ws := resolveOne(roots, args[0], false)
|
||||
|
||||
now := time.Now().UTC().Truncate(time.Second)
|
||||
ws.Meta.Status = "archived"
|
||||
@@ -36,7 +36,7 @@ func runArchive(cmd *cobra.Command, args []string) error {
|
||||
return fmt.Errorf("updating metadata: %w", err)
|
||||
}
|
||||
|
||||
relPath := workspace.RelativePath(root, ws.Path)
|
||||
relPath := workspace.RelativePath(ws.Root, ws.Path)
|
||||
fmt.Printf("[ctask] archived: %s\n", relPath)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user