rn-forge-tooling 0.4.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rn-forge-tooling
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Developer-tool lifecycle verbs and install mechanics for the rn-forge-* CLIs
5
5
  Author: Rohit Narayanan
6
6
  Author-email: Rohit Narayanan <rohit.nn@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rn-forge-tooling"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Developer-tool lifecycle verbs and install mechanics for the rn-forge-* CLIs"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rn-forge-tooling"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Developer-tool lifecycle verbs and install mechanics for the rn-forge-* CLIs"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Rohit Narayanan", email = "rohit.nn@gmail.com" }]
@@ -49,6 +49,7 @@ fi
49
49
  """The ``env.sh`` text, with ``<home>`` standing for the home's absolute path."""
50
50
 
51
51
  _SCHEMA_LINE = re.compile(r"^# rn-forge home environment, schema (\d+)\.")
52
+ _ENV_FILE = "env.sh"
52
53
 
53
54
  _SEGMENT = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+-]*$")
54
55
  """A product name or version: one path segment that cannot climb out of its parent."""
@@ -84,7 +85,7 @@ def env_schema(root: Path) -> int | None:
84
85
  The number, or ``None`` when the file is missing or empty, or its first
85
86
  line is not the schema line, so the file is not ours.
86
87
  """
87
- path = Path(root) / "env.sh"
88
+ path = Path(root) / _ENV_FILE
88
89
  if not path.is_file():
89
90
  return None
90
91
  lines = path.read_text(encoding="utf-8", errors="replace").splitlines()
@@ -102,7 +103,7 @@ def write_env(root: Path) -> EnvWrite:
102
103
  Which case applied. A file with the same or a higher schema, or with no
103
104
  schema line, is left unchanged.
104
105
  """
105
- path = Path(root) / "env.sh"
106
+ path = Path(root) / _ENV_FILE
106
107
  if path.is_file():
107
108
  recorded = env_schema(root)
108
109
  if recorded is None:
@@ -173,7 +174,7 @@ class ToolHome:
173
174
  @property
174
175
  def env_path(self) -> Path:
175
176
  """``<home>/env.sh``, owned by the home rather than the product."""
176
- return self.root / "env.sh"
177
+ return self.root / _ENV_FILE
177
178
 
178
179
  @property
179
180
  def completions_dir(self) -> Path: