diff options
author | Gruruya <gruruya.chi4c@slmails.com> | 2023-05-27 00:54:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 06:54:21 +0200 |
commit | 09f36f51989dd8045129781285902f4eaa07779b (patch) | |
tree | c60b935f581eb9c0dacb19cfd4416346f85530ab /tools/atlas/atlas.nim | |
parent | 2beea7281061822b69e77715c8b0c30ed4d55a5c (diff) | |
download | Nim-09f36f51989dd8045129781285902f4eaa07779b.tar.gz |
atlas: search improvements (#21929)
* Get description and license from github json response * Allow running `atlas search` outside of a workspace * Check `len` instead of `dirExists` * make `list` identical to `search`
Diffstat (limited to 'tools/atlas/atlas.nim')
-rw-r--r-- | tools/atlas/atlas.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/atlas/atlas.nim b/tools/atlas/atlas.nim index d46378796..97e6afbb9 100644 --- a/tools/atlas/atlas.nim +++ b/tools/atlas/atlas.nim @@ -756,10 +756,10 @@ proc main = c.workspace = detectWorkspace() if c.workspace.len > 0: readConfig c - else: + echo "Using workspace ", c.workspace + elif action notin ["search", "list"]: error "No workspace found. Run `atlas init` if you want this current directory to be your workspace." return - echo "Using workspace ", c.workspace when MockupRun: c.depsDir = c.workspace @@ -807,8 +807,10 @@ proc main = noArgs() updatePackages(c) of "search", "list": - updatePackages(c) - search getPackages(c.workspace), args + if c.workspace.len != 0: + updatePackages(c) + search getPackages(c.workspace), args + else: search @[], args of "updateprojects": updateDir(c, c.workspace, if args.len == 0: "" else: args[0]) of "updatedeps": |