Skip to content

Commit 97d53c2

Browse files
committed
Merge to upstream
2 parents 30979c8 + d555365 commit 97d53c2

File tree

30 files changed

+918
-187
lines changed

30 files changed

+918
-187
lines changed

Cargo.lock

Lines changed: 108 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ cargo r
3535

3636
# To run a script
3737
cargo r -- ./scripts/hello_world.sh
38+
39+
# To run a script and continue in interactive mode
40+
cargo r -- ./scripts/hello_world.sh --interact
3841
```
3942

4043
## License

crates/deno_task_shell/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ shell = ["futures", "glob", "os_pipe", "path-dedot", "tokio", "tokio-util"]
1515
serialization = ["serde"]
1616

1717
[dependencies]
18-
anyhow = "1.0.87"
1918
futures = { version = "0.3.30", optional = true }
2019
glob = { version = "0.3.1", optional = true }
2120
path-dedot = { version = "3.1.1", optional = true }
@@ -24,11 +23,11 @@ tokio-util = { version = "0.7.12", optional = true }
2423
os_pipe = { version = "1.2.1", optional = true }
2524
serde = { version = "1", features = ["derive"], optional = true }
2625
thiserror = "1.0.63"
27-
pest = { git = "https://github.com/pest-parser/pest.git", branch = "master", features = ["miette-error"] }
26+
pest = { version="2.7.13", features = ["miette-error"] }
2827
pest_derive = "2.7.12"
2928
dirs = "5.0.1"
30-
pest_ascii_tree = { git = "https://github.com/prsabahrami/pest_ascii_tree.git", branch = "master" }
31-
miette = "7.2.0"
29+
pest_ascii_tree = "0.1.0"
30+
miette = { version = "7.2.0", features = ["fancy"] }
3231
lazy_static = "1.4.0"
3332

3433
[dev-dependencies]

crates/deno_task_shell/src/grammar.pest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,13 @@ if_clause = !{
291291
}
292292

293293
else_part = !{
294-
Elif ~ conditional_expression ~ Then ~ complete_command ~ linebreak ~ else_part? |
294+
Elif ~ conditional_expression ~ linebreak ~ Then ~ complete_command ~ linebreak ~ else_part? |
295295
Else ~ linebreak ~ complete_command
296296
}
297297

298298
conditional_expression = !{
299-
("[[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]]") |
300-
("[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]") |
299+
("[[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]]" ~ ";"?) |
300+
("[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]" ~ ";"?) |
301301
("test" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD))
302302
}
303303

crates/deno_task_shell/src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ fn parse_quoted_word(pair: Pair<Rule>) -> Result<WordPart> {
15791579
parts.push(WordPart::Command(command));
15801580
}
15811581
Rule::VARIABLE => {
1582-
parts.push(WordPart::Variable(part.as_str()[1..].to_string()))
1582+
parts.push(WordPart::Variable(part.as_str().to_string()))
15831583
}
15841584
Rule::QUOTED_CHAR => {
15851585
if let Some(WordPart::Text(ref mut s)) = parts.last_mut() {

crates/deno_task_shell/src/shell/commands/args.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018-2024 the Deno authors. MIT license.
22

3-
use anyhow::bail;
4-
use anyhow::Result;
3+
use miette::bail;
4+
use miette::Result;
55

66
#[derive(Debug, PartialEq, Eq)]
77
pub enum ArgKind<'a> {

0 commit comments

Comments
 (0)