File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,12 @@ inputs:
1717 Time machine for testing
1818 required : false
1919 type : string
20+ manifest-path : >-
21+ description: >-
22+ Path to the manifest file of `pixi`. Required for `pixi` environments.
23+ required: false
24+ type: string
2025outputs : {}
21-
2226runs :
2327 using : " composite"
2428
3842 POLICY_PATH : ${{ inputs.policy }}
3943 ENVIRONMENT_PATHS : ${{ inputs.environment-paths }}
4044 TODAY : ${{ inputs.today }}
45+ MANIFEST_PATH : ${{ inputs.manifest-path }}
4146 run : |
4247 python -m minimum_versions validate \
4348 --today="$TODAY" \
4449 --policy="$POLICY_PATH" \
50+ --manifest-path="$MANIFEST_PATH" \
4551 $ENVIRONMENT_PATHS
Original file line number Diff line number Diff line change 22import os .path
33import pathlib
44import sys
5+ from typing import Any
56
67import rich_click as click
78from rich .console import Console
@@ -24,6 +25,16 @@ def parse_date(string):
2425 return datetime .datetime .strptime (string , "%Y-%m-%d" ).date ()
2526
2627
28+ class _Path (click .Path ):
29+ def convert (
30+ self , value : Any , param : click .Parameter | None , ctx : click .Context | None
31+ ) -> Any :
32+ if not value :
33+ return None
34+
35+ return super ().convert (value , param , ctx )
36+
37+
2738@click .group ()
2839def main ():
2940 pass
@@ -34,7 +45,7 @@ def main():
3445@click .option (
3546 "--manifest-path" ,
3647 "manifest_path" ,
37- type = click . Path (exists = True , path_type = pathlib .Path ),
48+ type = _Path (exists = True , path_type = pathlib .Path ),
3849 default = None ,
3950)
4051@click .option ("--today" , type = parse_date , default = None )
You can’t perform that action at this time.
0 commit comments