aboutsummaryrefslogtreecommitdiff
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/main.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 3b0203d..751871c 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -6,7 +6,8 @@ fn main() {
let args: Vec<String> = env::args().collect();
let command = args[1].as_str();
- let options = ActionOptions::from_pwd().expect("Could not get current path.");
+ let options = ActionOptions::from_path("./repo");
+ //let options = ActionOptions::from_pwd().expect("Could not get current path.");
match command {
"create" => {
@@ -16,11 +17,9 @@ fn main() {
update(options).expect("Failed executing Update action.");
}
"shift" => {
- let file_path = args[2].as_str();
+ let new_cursor: usize = args[2].as_str().parse().expect("Invalid cursor.");
- let new_cursor: usize = args[3].as_str().parse().expect("Invalid cursor.");
-
- shift(options, file_path, new_cursor).expect("Failed executing Shift actions.");
+ shift(options, new_cursor).expect("Failed executing Shift actions.");
}
_ => panic!("Unknown command: {}", command),
}