Skip to content
Snippets Groups Projects
Commit 1837fca0 authored by nibon7's avatar nibon7 Committed by alice
Browse files

testing/nushell: fix timestamp parsing on 32-bit platforms

parent d263f688
No related branches found
No related tags found
1 merge request!33165testing/nushell: upgrade to 0.61.0
From e1f455ad3bca47313b31086d85c15ab4384e9595 Mon Sep 17 00:00:00 2001
From: nibon7 <nibon7@163.com>
Date: Thu, 14 Apr 2022 20:58:01 +0800
Subject: [PATCH] fix timestamp parsing on 32-bit platforms
---
crates/nu-command/src/filesystem/touch.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/nu-command/src/filesystem/touch.rs b/crates/nu-command/src/filesystem/touch.rs
index bb10fd2b..8f3e7555 100644
--- a/crates/nu-command/src/filesystem/touch.rs
+++ b/crates/nu-command/src/filesystem/touch.rs
@@ -124,7 +124,7 @@ impl Command for Touch {
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
- 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(
"input has an invalid timestamp".to_string(),
span,
--
2.35.1
...@@ -13,6 +13,7 @@ subpackages="$pkgname-plugins:_plugins" ...@@ -13,6 +13,7 @@ subpackages="$pkgname-plugins:_plugins"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall" install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
source="$pkgname-$pkgver.tar.gz::https://github.com/nushell/nushell/archive/$pkgver.tar.gz source="$pkgname-$pkgver.tar.gz::https://github.com/nushell/nushell/archive/$pkgver.tar.gz
0001-disable-lto.patch 0001-disable-lto.patch
0002-fix-timestamp-parsing-on-32-bit-platforms.patch
" "
prepare() { prepare() {
...@@ -45,4 +46,5 @@ _plugins() { ...@@ -45,4 +46,5 @@ _plugins() {
sha512sums="32586811dd404d5905f0c2e401d254424325146a4769499b6da24aea3eb87fd4537fd5760f8d31378aea04e6a1c6c472c646e6cba868dba532561e6bbec07ac7 nushell-0.61.0.tar.gz sha512sums="32586811dd404d5905f0c2e401d254424325146a4769499b6da24aea3eb87fd4537fd5760f8d31378aea04e6a1c6c472c646e6cba868dba532561e6bbec07ac7 nushell-0.61.0.tar.gz
478fe6a18644cd0ff8972b984eab48736b5e0f650cf995a8d140010b76a3ac0bfbf71819e70d5a863035c8c63bd63a07b78581e501702b446edc231f2679a041 0001-disable-lto.patch 478fe6a18644cd0ff8972b984eab48736b5e0f650cf995a8d140010b76a3ac0bfbf71819e70d5a863035c8c63bd63a07b78581e501702b446edc231f2679a041 0001-disable-lto.patch
0a176d7eb14a6beddb5b43cc13c03d74ea56eb958d2401e8051aef2269d704c10a474394871136cc9b9868bf0e626105baef3d23e9c12bd8e39ac39587bf8d74 0002-fix-timestamp-parsing-on-32-bit-platforms.patch
" "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment