Skip to content

Commit

Permalink
Merge to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Armd04 committed Oct 7, 2024
2 parents 30979c8 + d555365 commit 97d53c2
Show file tree
Hide file tree
Showing 30 changed files with 918 additions and 187 deletions.
139 changes: 108 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ cargo r

# To run a script
cargo r -- ./scripts/hello_world.sh

# To run a script and continue in interactive mode
cargo r -- ./scripts/hello_world.sh --interact
```

## License
Expand Down
7 changes: 3 additions & 4 deletions crates/deno_task_shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ shell = ["futures", "glob", "os_pipe", "path-dedot", "tokio", "tokio-util"]
serialization = ["serde"]

[dependencies]
anyhow = "1.0.87"
futures = { version = "0.3.30", optional = true }
glob = { version = "0.3.1", optional = true }
path-dedot = { version = "3.1.1", optional = true }
Expand All @@ -24,11 +23,11 @@ tokio-util = { version = "0.7.12", optional = true }
os_pipe = { version = "1.2.1", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
thiserror = "1.0.63"
pest = { git = "https://github.com/pest-parser/pest.git", branch = "master", features = ["miette-error"] }
pest = { version="2.7.13", features = ["miette-error"] }
pest_derive = "2.7.12"
dirs = "5.0.1"
pest_ascii_tree = { git = "https://github.com/prsabahrami/pest_ascii_tree.git", branch = "master" }
miette = "7.2.0"
pest_ascii_tree = "0.1.0"
miette = { version = "7.2.0", features = ["fancy"] }
lazy_static = "1.4.0"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions crates/deno_task_shell/src/grammar.pest
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@ if_clause = !{
}

else_part = !{
Elif ~ conditional_expression ~ Then ~ complete_command ~ linebreak ~ else_part? |
Elif ~ conditional_expression ~ linebreak ~ Then ~ complete_command ~ linebreak ~ else_part? |
Else ~ linebreak ~ complete_command
}

conditional_expression = !{
("[[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]]") |
("[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]") |
("[[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]]" ~ ";"?) |
("[" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD) ~ "]" ~ ";"?) |
("test" ~ (unary_conditional_expression | binary_conditional_expression | UNQUOTED_PENDING_WORD))
}

Expand Down
2 changes: 1 addition & 1 deletion crates/deno_task_shell/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ fn parse_quoted_word(pair: Pair<Rule>) -> Result<WordPart> {
parts.push(WordPart::Command(command));
}
Rule::VARIABLE => {
parts.push(WordPart::Variable(part.as_str()[1..].to_string()))
parts.push(WordPart::Variable(part.as_str().to_string()))
}
Rule::QUOTED_CHAR => {
if let Some(WordPart::Text(ref mut s)) = parts.last_mut() {
Expand Down
4 changes: 2 additions & 2 deletions crates/deno_task_shell/src/shell/commands/args.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. MIT license.

use anyhow::bail;
use anyhow::Result;
use miette::bail;
use miette::Result;

#[derive(Debug, PartialEq, Eq)]
pub enum ArgKind<'a> {
Expand Down
Loading

0 comments on commit 97d53c2

Please sign in to comment.