mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 07:18:50 +00:00
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.
This commit is contained in:
1 parent
54002e83fa
commit
34ae0dcc03
15 files changed
+49
-14
No files matched your search
@@ -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.
|
||||
|
||||
+1
-1
@@ -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:
|
||||
|
||||
+1
-1
@@ -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:
|
||||
|
||||
+1
-1
@@ -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 :
|
||||
|
||||
+1
-1
@@ -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 では、インストール後に新しいターミナルを開きます。そのあと:
|
||||
|
||||
@@ -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:
|
||||
|
||||
+1
-1
@@ -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:
|
||||
|
||||
+1
-1
@@ -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:
|
||||
|
||||
+1
-1
@@ -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 上,安装后请打开一个新的终端。然后运行:
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user