diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3df53d6..e131174 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,15 +55,21 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, macos, windows] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + exclude: + - os: macos-latest + python-version: '3.7' + include: + - os: macos-13 + python-version: '3.7' env: PYTHON: ${{ matrix.python-version }} OS: ${{ matrix.os }} EXTRAS: yes - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/devtools/__main__.py b/devtools/__main__.py index 2fbc79a..a5fa2f5 100644 --- a/devtools/__main__.py +++ b/devtools/__main__.py @@ -64,7 +64,9 @@ def install() -> int: print(f'Found path `{install_path}` to install devtools into `builtins`') print('To install devtools, run the following command:\n') print(f' python -m devtools print-code >> {install_path}\n') - if not install_path.is_relative_to(Path.home()): + try: + install_path.relative_to(Path.home()) + except ValueError: print('or maybe\n') print(f' python -m devtools print-code | sudo tee -a {install_path} > /dev/null\n') print('Note: "sudo" might be required because the path is in your home directory.')