mirror of
https://github.com/nushell/nushell
synced 2024-11-11 07:34:14 +00:00
parent
7490392eb9
commit
2fe14a7a5a
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ impl Command for Touch {
|
||||||
let size = val.len();
|
let size = val.len();
|
||||||
|
|
||||||
// Each stamp is a 2 digit number and the whole stamp must not be less than 4 or greater than 7 pairs
|
// Each stamp is a 2 digit number and the whole stamp must not be less than 4 or greater than 7 pairs
|
||||||
if (size % 2 != 0 || !(8..=14).contains(&size)) || val.parse::<usize>().is_err() {
|
if (size % 2 != 0 || !(8..=14).contains(&size)) || val.parse::<u64>().is_err() {
|
||||||
return Err(ShellError::UnsupportedInput(
|
return Err(ShellError::UnsupportedInput(
|
||||||
"input has an invalid timestamp".to_string(),
|
"input has an invalid timestamp".to_string(),
|
||||||
span,
|
span,
|
||||||
|
|
Loading…
Reference in a new issue