diff --git a/testing/nushell/0002-fix-timestamp-parsing-on-32-bit-platforms.patch b/testing/nushell/0002-fix-timestamp-parsing-on-32-bit-platforms.patch new file mode 100644 index 0000000000000000000000000000000000000000..3042918d815b8fdc863999265b6984e6b6156cae --- /dev/null +++ b/testing/nushell/0002-fix-timestamp-parsing-on-32-bit-platforms.patch @@ -0,0 +1,25 @@ +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 + diff --git a/testing/nushell/APKBUILD b/testing/nushell/APKBUILD index 309f7272ccb43c28c879198c0cb804accccd2019..bf12c9356237d713e270e60cf8d2407de56ba750 100644 --- a/testing/nushell/APKBUILD +++ b/testing/nushell/APKBUILD @@ -13,6 +13,7 @@ subpackages="$pkgname-plugins:_plugins" install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall" source="$pkgname-$pkgver.tar.gz::https://github.com/nushell/nushell/archive/$pkgver.tar.gz 0001-disable-lto.patch + 0002-fix-timestamp-parsing-on-32-bit-platforms.patch " prepare() { @@ -45,4 +46,5 @@ _plugins() { sha512sums="32586811dd404d5905f0c2e401d254424325146a4769499b6da24aea3eb87fd4537fd5760f8d31378aea04e6a1c6c472c646e6cba868dba532561e6bbec07ac7 nushell-0.61.0.tar.gz 478fe6a18644cd0ff8972b984eab48736b5e0f650cf995a8d140010b76a3ac0bfbf71819e70d5a863035c8c63bd63a07b78581e501702b446edc231f2679a041 0001-disable-lto.patch +0a176d7eb14a6beddb5b43cc13c03d74ea56eb958d2401e8051aef2269d704c10a474394871136cc9b9868bf0e626105baef3d23e9c12bd8e39ac39587bf8d74 0002-fix-timestamp-parsing-on-32-bit-platforms.patch "