Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat Touch #158

Merged
merged 29 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
508505a
Add support for test
prsabahrami Sep 22, 2024
404c90f
Added tests
prsabahrami Sep 22, 2024
eb4f0b9
Merge branch 'main' into touch
prsabahrami Sep 22, 2024
ad2bf31
run fmt
prsabahrami Sep 22, 2024
4fa753e
Moved touch stuff to shell side
prsabahrami Sep 24, 2024
74ecc51
Redo testing by moving functions on touch.rs to shell
prsabahrami Sep 26, 2024
77a489b
Increase coverage
prsabahrami Sep 26, 2024
135b3c6
run fmt
prsabahrami Sep 26, 2024
3b97729
Remove extra crates
prsabahrami Sep 26, 2024
211b393
Add support for windows
prsabahrami Sep 26, 2024
06bb772
Update lockfile
prsabahrami Sep 26, 2024
5368061
Fix error message
prsabahrami Sep 26, 2024
a5cfbf9
Merge branch 'main' into touch
prsabahrami Sep 26, 2024
5de6001
Update test
prsabahrami Sep 26, 2024
76c5c9a
Using TEMPDIR for absolute path instead of ~
prsabahrami Sep 27, 2024
596aa66
run fmt
prsabahrami Sep 27, 2024
af545de
Using OpenOptions instead of File for file creation
prsabahrami Sep 27, 2024
46166be
run fmt
prsabahrami Sep 27, 2024
a16399b
map error to print the same error on both platforms
prsabahrami Sep 28, 2024
07609d3
Updated tests
prsabahrami Sep 28, 2024
1e35479
Merge branch 'main' into touch
prsabahrami Sep 28, 2024
2e3945f
Merge branch 'main' into touch
prsabahrami Sep 29, 2024
40c9337
Add tmate for debugging
prsabahrami Sep 29, 2024
c19fc12
Update tmate github action
prsabahrami Sep 29, 2024
8ffad01
Add temp_dir correctly to test_builder
prsabahrami Sep 29, 2024
30c1fa1
Use NO_GRAPHICS for miette erros
prsabahrami Sep 29, 2024
7e8d7cc
Remove extra print in assert
prsabahrami Sep 29, 2024
afa1f4b
Merge branch 'main' into touch
prsabahrami Sep 29, 2024
6936a2b
Update duplicate in toml file
prsabahrami Sep 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 68 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/deno_task_shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pest = { git = "https://github.com/pest-parser/pest.git", branch = "master", fea
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"
miette = { version = "7.2.0", features = ["fancy"] }
lazy_static = "1.4.0"

[dev-dependencies]
Expand Down
8 changes: 7 additions & 1 deletion crates/shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ uu_ls = "0.0.27"
dirs = "5.0.1"
which = "6.0.3"
uu_uname = "0.0.27"
uu_touch = "0.0.27"
uu_date = "0.0.27"
miette = { version = "7.2.0", features = ["fancy"] }
filetime = "0.2.25"
chrono = "0.4.38"
parse_datetime = "0.6.0"
dtparse = "2.0.1"
windows-sys = "0.59.0"
ctrlc = "3.4.5"
miette = { version="7.2.0", features = ["fancy"] }

[package.metadata.release]
# Dont publish the binary
Expand Down
6 changes: 6 additions & 0 deletions crates/shell/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ use uu_ls::uumain as uu_ls;
use crate::execute;

pub mod date;
pub mod touch;
pub mod uname;
pub mod which;

pub use date::DateCommand;
pub use touch::TouchCommand;
pub use uname::UnameCommand;
pub use which::WhichCommand;

Expand Down Expand Up @@ -46,6 +48,10 @@ pub fn get_commands() -> HashMap<String, Rc<dyn ShellCommand>> {
"uname".to_string(),
Rc::new(UnameCommand) as Rc<dyn ShellCommand>,
),
(
"touch".to_string(),
Rc::new(TouchCommand) as Rc<dyn ShellCommand>,
),
(
"date".to_string(),
Rc::new(DateCommand) as Rc<dyn ShellCommand>,
Expand Down
Loading
Loading