From 34ae0dcc03772669184bf861a87563acf5ce3c19 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Tue, 10 Nov 2026 16:37:45 +0100 Subject: [PATCH] docs: the Windows install line carries a time limit (lane 15) irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex In Windows PowerShell 5.1 the limit bounds the wait for the answer; in PowerShell 7 it is a total cap, which is fine for a script of a few KB. Changed in README.md and its seven translations, AGENTS.md, SECURITY.md, docs/AI_SETUP.md, INSTALL.md, TERMINAL_LAUNCH.md and the comment at the top of packaging/install.ps1. Owner approved the line. tests/terminal/test_net_install_sh.py class DocumentedLines checks both documented lines and that no copy of an old one is left outside the old release notes. --- AGENTS.md | 2 +- README.de.md | 2 +- README.es.md | 2 +- README.fr.md | 2 +- README.ja.md | 2 +- README.md | 2 +- README.pl.md | 2 +- README.pt-BR.md | 2 +- README.zh-CN.md | 2 +- SECURITY.md | 2 +- docs/AI_SETUP.md | 2 +- docs/INSTALL.md | 2 +- docs/TERMINAL_LAUNCH.md | 2 +- packaging/install.ps1 | 2 +- tests/terminal/test_net_install_sh.py | 35 +++++++++++++++++++++++++++ 15 files changed, 49 insertions(+), 14 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index bf394cdfeb..34964a92de 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,7 +35,7 @@ short version is: ```sh curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh # Linux, Mac - irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex # Windows PowerShell + irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex # Windows PowerShell ``` On Windows, open a new terminal afterwards so that `strata` is on the PATH. diff --git a/README.de.md b/README.de.md index 9e8d27cd00..1d4ed9137d 100644 --- a/README.de.md +++ b/README.de.md @@ -121,7 +121,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` Öffne unter Windows danach ein neues Terminal. Dann: diff --git a/README.es.md b/README.es.md index ace243a9df..654ac7451e 100644 --- a/README.es.md +++ b/README.es.md @@ -121,7 +121,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` En Windows, abre una terminal nueva después. Luego: diff --git a/README.fr.md b/README.fr.md index ad816d2744..24bcb28f46 100644 --- a/README.fr.md +++ b/README.fr.md @@ -121,7 +121,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` Sous Windows, ouvrez ensuite un nouveau terminal. Puis : diff --git a/README.ja.md b/README.ja.md index 4eedcf06c9..3c44f24696 100644 --- a/README.ja.md +++ b/README.ja.md @@ -121,7 +121,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` Windows では、インストール後に新しいターミナルを開きます。そのあと: diff --git a/README.md b/README.md index a59931ae77..24893bf9ae 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` On Windows, open a new terminal afterwards. Then: diff --git a/README.pl.md b/README.pl.md index b3f17fd0b8..acc092faf1 100644 --- a/README.pl.md +++ b/README.pl.md @@ -125,7 +125,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` W Windows otwórz potem nowe okno terminala. Następnie: diff --git a/README.pt-BR.md b/README.pt-BR.md index f0b121197c..ccb4540332 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -121,7 +121,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` No Windows, abra um novo terminal depois. Em seguida: diff --git a/README.zh-CN.md b/README.zh-CN.md index ab3aa7b791..f5de3420c0 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -121,7 +121,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` 在 Windows 上,安装后请打开一个新的终端。然后运行: diff --git a/SECURITY.md b/SECURITY.md index da2cf381e5..9a5f3696c4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -76,7 +76,7 @@ The Terminal installs with one line: ```sh curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` Piping a script into a shell runs whatever the server sends, so it deserves the same care as running any downloaded program. diff --git a/docs/AI_SETUP.md b/docs/AI_SETUP.md index 792d2a09c3..236f9e0347 100644 --- a/docs/AI_SETUP.md +++ b/docs/AI_SETUP.md @@ -45,7 +45,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell:** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` Open a new terminal on Windows. On Linux and Mac, use the full executable path printed by the installer if diff --git a/docs/INSTALL.md b/docs/INSTALL.md index efce38c532..a79a15147e 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -73,7 +73,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat **Windows PowerShell** ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` On Windows, open a **new terminal** afterwards. On Linux and Mac, if `strata` is not found, use the full path printed diff --git a/docs/TERMINAL_LAUNCH.md b/docs/TERMINAL_LAUNCH.md index b3715995e0..485258a1b0 100644 --- a/docs/TERMINAL_LAUNCH.md +++ b/docs/TERMINAL_LAUNCH.md @@ -29,7 +29,7 @@ curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strat Windows PowerShell (then open a new terminal): ```powershell -irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex ``` More in [INSTALL.md](INSTALL.md#the-terminal). The installer needs no administrator rights and puts `strata` on your PATH. diff --git a/packaging/install.ps1 b/packaging/install.ps1 index 4d224bef12..84dfd8f433 100644 --- a/packaging/install.ps1 +++ b/packaging/install.ps1 @@ -1,6 +1,6 @@ # Strata Terminal: one-line installer for Windows (PowerShell 5.1 or newer). # -# irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex +# irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex # # What it does, in order (and nothing else): # 1. finds out which computer this is (Windows, processor, graphics card); diff --git a/tests/terminal/test_net_install_sh.py b/tests/terminal/test_net_install_sh.py index d1fcd0ffd4..a412aad715 100644 --- a/tests/terminal/test_net_install_sh.py +++ b/tests/terminal/test_net_install_sh.py @@ -70,6 +70,41 @@ class InstallFetch(unittest.TestCase): self.assertGreater(took, 70) +class DocumentedLines(unittest.TestCase): + """W12 and the Windows line (owner 11-10): the documented install lines carry their limits; no copy of the old lines is left (old release notes + are history and keep theirs).""" + OLD = ("curl -fsSL https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh", + "curl -fsSLO https://github.com/Niko1221/Strata/releases/latest/download/install.sh", + "irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex") + + def files(self): + for p in ROOT.rglob("*"): + rel = p.relative_to(ROOT).as_posix() + if p.suffix.lower() not in (".md", ".ps1", ".sh", ".txt", ".json", ".ts", ".tsx", ".mjs", ".py", ".html") or not p.is_file(): + continue + if rel.startswith(("node_modules/", ".git/", "history/")) or "/node_modules/" in rel or "release-notes-" in p.name: + continue + if p.resolve() == Path(__file__).resolve(): + continue + yield rel, p + + def test_no_old_line_is_left(self): + left = [] + for rel, p in self.files(): + try: + text = p.read_text(encoding="utf-8") + except (OSError, UnicodeDecodeError): + continue + left += [rel for old in self.OLD if old in text] + self.assertEqual(left, []) + + def test_the_readme_lines(self): + text = (ROOT / "README.md").read_text(encoding="utf-8") + self.assertIn("curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strata/releases/latest/download/install.sh " + "-o install.sh && sh install.sh", text) + self.assertIn("irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex", text) + + class InstallPs1Text(unittest.TestCase): """Item 6: packaging/install.ps1 under the same rule (its real run is on Windows, through the coordinator)."""