Skip to content

Commit

Permalink
fix(cli): config from url; don't strip entire path (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-prosser authored Sep 3, 2024
1 parent fa87853 commit 2fca56a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased
- Add validation to dataset `--stats`
- fix issue when adding configs from url

# v0.32.0
- Add dataset flags to `create-dataset`
Expand Down
10 changes: 6 additions & 4 deletions cli/src/commands/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,14 @@ fn parse_context_from_url(
))
};
}
let name: String = format!("{}/{}", path_segments[0], path_segments[1]);
// Remove the path to use the rest as the endpoint
url.set_path("");

let organisation = path_segments[0];
let tenant = path_segments[1];
let org_slash_tenant: String = format!("{organisation}/{tenant}");
url.set_path(&format!("{org_slash_tenant}/reinfer_"));

add_or_edit_context(
&Some(name),
&Some(org_slash_tenant),
token,
&Some(url),
false,
Expand Down

0 comments on commit 2fca56a

Please sign in to comment.