-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commands can now have env entries with null values to indicate the corresponding environment variable should be removed. The leading `=` syntax removes exact matches; otherwise the env variable name is interpreted as a regex and all matching env vars are removed.
- Loading branch information
Showing
14 changed files
with
263 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ members = [ | |
|
||
[package] | ||
name = "scie-jump" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
description = "The self contained interpreted executable launcher." | ||
authors = [ | ||
"John Sirois <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "jump" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
description = "The bulk of the scie-jump binary logic." | ||
authors = [ | ||
"John Sirois <[email protected]>", | ||
|
@@ -19,6 +19,7 @@ itertools = "0.10" | |
log = { workspace = true } | ||
logging_timer = { workspace = true } | ||
memmap = "0.7" | ||
regex = { version = "1.7", default_features = false, features = ["std"] } | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
sha2 = "0.10" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2022 Science project contributors. | ||
// Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
use std::cmp::Ordering; | ||
use std::fmt::{Display, Formatter}; | ||
use std::hash::{Hash, Hasher}; | ||
use std::ops::Deref; | ||
|
||
use regex::Regex; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct ComparableRegex(Regex); | ||
|
||
impl Deref for ComparableRegex { | ||
type Target = Regex; | ||
|
||
fn deref(&self) -> &Self::Target { | ||
&self.0 | ||
} | ||
} | ||
|
||
impl Display for ComparableRegex { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
f.write_str(self.0.as_str()) | ||
} | ||
} | ||
|
||
impl PartialEq<Self> for ComparableRegex { | ||
fn eq(&self, other: &Self) -> bool { | ||
self.0.as_str() == other.0.as_str() | ||
} | ||
} | ||
|
||
impl Eq for ComparableRegex {} | ||
|
||
impl PartialOrd<Self> for ComparableRegex { | ||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { | ||
self.0.as_str().partial_cmp(other.0.as_str()) | ||
} | ||
} | ||
|
||
impl Ord for ComparableRegex { | ||
fn cmp(&self, other: &Self) -> Ordering { | ||
self.0.as_str().cmp(other.0.as_str()) | ||
} | ||
} | ||
|
||
impl Hash for ComparableRegex { | ||
fn hash<H: Hasher>(&self, state: &mut H) { | ||
self.0.as_str().hash(state); | ||
} | ||
} | ||
|
||
impl TryFrom<&str> for ComparableRegex { | ||
type Error = String; | ||
|
||
fn try_from(value: &str) -> Result<Self, Self::Error> { | ||
Ok(Self(Regex::new(value).map_err(|e| { | ||
format!("Failed to parse {value} as a regex: {e}") | ||
})?)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.