Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
e2fe3f2
First version of powershell script without python running
cderv Jan 24, 2023
b0cfe94
Setup python environment for Windows and UNIX
cderv Jan 25, 2023
b5c0741
update python package
cderv Jan 25, 2023
230c51b
Try something for python on windows
cderv Jan 25, 2023
bfa82f5
Activate tests on Windows
cderv Jan 25, 2023
7ee1977
Adapt our action for windows
cderv Jan 25, 2023
1890775
Run effectively CI on windows
cderv Jan 25, 2023
22213bb
Try unix with the python virtualenv setup that probably is not used a…
cderv Jan 25, 2023
55e606d
Forgot ;; in the bash case syntax
cderv Jan 25, 2023
4a193db
Fix all syntax
cderv Jan 25, 2023
3b9f813
.python-version is not found as in tests/ and not root project
cderv Jan 25, 2023
627cd09
Separate in one step per OS
cderv Jan 25, 2023
add2c38
Put back setup in main workflow
cderv Jan 25, 2023
53c1669
We need some platform specifier in requirement.txt
cderv Jan 25, 2023
03f5a88
[debug] Adapt GHA to debug
cderv Jan 25, 2023
e505add
Fix configure.cmd to work on CI
cderv Jan 26, 2023
3bb301a
[debug] deactivate tmate
cderv Jan 26, 2023
00b9c42
Correctly put quarto to PATH for Unix and Windows
cderv Jan 26, 2023
d74b512
Merge branch 'main' into windows/run-tests
cderv Jan 26, 2023
5d5d4ca
Check that new Julia addition is also working
cderv Jan 26, 2023
ae55ed5
Correct quote for Windows and UNIX
cderv Jan 26, 2023
b7bfa0e
Fix merge problem in figute test for Julia
cderv Jan 26, 2023
cae26e2
fIx custom action to work on Windows and UNIX
cderv Jan 26, 2023
47b1804
Add caching to Julia
cderv Jan 26, 2023
5bec941
Try with no quote to export an ENV in github action with cmd shell
cderv Jan 26, 2023
63c5877
Correct action for Julia Cache
cderv Jan 26, 2023
f26424f
Try with powershell instead of cmd for window sheel in custom action
cderv Jan 26, 2023
3790f2b
Try using pwsh shell available for all OS too
cderv Jan 26, 2023
6897b2b
Show PATH to check it is correctly set
cderv Jan 26, 2023
2eeecd1
[debug] try tmate in composition action
cderv Jan 26, 2023
047b73b
Correct test for sanity check
cderv Jan 26, 2023
b5cbd99
[debug] Only debug windows now
cderv Jan 26, 2023
141838b
[debug] Only run windows now
cderv Jan 26, 2023
3ad47a2
we need to stay in CMD to access variable
cderv Jan 26, 2023
b7df10d
Try to access variable again in CMD
cderv Jan 26, 2023
aa59f60
Remove the double backslash on windows
cderv Jan 26, 2023
7ec3880
fixup: Remove the double backslash on windows
cderv Jan 26, 2023
4fac13e
Retry with Powershell and set PATH hardcoded in action
cderv Jan 26, 2023
45b94c9
[debug] Move tmate to debug Julia installation
cderv Jan 26, 2023
674e12e
Keep original command for julia but enforce bash as shell
cderv Jan 26, 2023
d7a5d4a
[debug] Add tmate later to debug renv
cderv Jan 27, 2023
e56d26d
For multi OS we need another RENV_PATH_ROOT
cderv Jan 27, 2023
bfe07e8
Set RENV_PATHS_ROOT later
cderv Jan 27, 2023
508358e
[debug] Check on linux and no tmate
cderv Jan 27, 2023
23e7960
Add a configure helper script
cderv Jan 27, 2023
e42b1c8
Merge branch 'main' into windows/run-tests
cderv Jan 27, 2023
9f37289
[tests-fix] Handle windows path correctly to detect folder
cderv Jan 27, 2023
2e2fa8f
[tests-fix] On windows, quarto.cmd needs to be run, not just quarto
cderv Jan 27, 2023
960a061
Fix TMPDIR on windows to avoid different disk drives
cderv Jan 27, 2023
8fe2707
Merge branch 'main' into windows/run-tests
cderv Jan 27, 2023
af0ae78
Fix tempdir for Deno to avoid different drive issue
cderv Jan 27, 2023
69dee79
[bug-fix] Check first for http(s) protocol before testing local
cderv Jan 27, 2023
c29a182
[tests-fix] Go back to parent dir before removing current directory
cderv Jan 27, 2023
6be8232
quarto.cmd needs to be explicit on Windows
cderv Jan 27, 2023
e4dfa93
test better for http(s) remote extension
cderv Feb 1, 2023
505d383
Revert "test better for http(s) remote extension"
cderv Feb 1, 2023
1eda31f
Merge pull request #4129 from quarto-dev/windows/fix-4124
dragonstyle Feb 1, 2023
4f34e94
Merge branch 'windows/run-tests' of https://github.com/quarto-dev/qua…
cderv Feb 1, 2023
ab30a82
Merge branch 'main' into windows/run-tests
cderv Feb 2, 2023
fa7f732
Merge branch 'windows/run-tests' of https://github.com/quarto-dev/qua…
cderv Feb 2, 2023
37409b2
Merge branch 'main' into windows/run-tests
cderv Feb 7, 2023
f7c506f
Add Julia configuration
cderv Feb 7, 2023
3452940
Checking newline should be OS independant
cderv Feb 7, 2023
418d077
Allow to ignore tests
cderv Feb 7, 2023
cbd1911
Add a configuration for VSCODE to debug in tests
cderv Feb 7, 2023
8f87fbf
Do not error on file existence when filtering resources (#4255)
cderv Feb 7, 2023
7edbd5f
Merge branch 'main' into windows/run-tests
cderv Feb 10, 2023
cff0223
Merge branch 'main' into windows/run-tests
cderv Feb 13, 2023
902c436
Show path to test as relative to tests directory.
cderv Feb 13, 2023
96ea80f
[fix] Correctly handle windows file path on windows for test logging
cderv Feb 13, 2023
7d71c07
[fix] Ignore qualified path tests on WIndows
cderv Feb 13, 2023
9ac134b
Merge branch 'main' into windows/run-tests
cderv Feb 13, 2023
ccbf8f9
Merge branch 'main' into windows/run-tests
cderv Feb 13, 2023
8634e12
Merge branch 'main' into windows/run-tests
cderv Feb 14, 2023
1381d96
Merge branch 'main' into windows/run-tests
cderv Feb 15, 2023
5ccadb4
[fix] Ignore test rendering to stdout for now
cderv Feb 15, 2023
04db6f4
[gha] Invalidate R cache based on OS and R version
cderv Feb 15, 2023
f30816b
[test workflow] same name as linux script
cderv Feb 15, 2023
25aa252
[fix] Fix playwright test by using quarto.cmd on Windows
cderv Feb 15, 2023
35a5f79
[gha] Use pak to install dependency
cderv Feb 15, 2023
289c508
[gha] Fix name of script in worflow
cderv Feb 15, 2023
acb1cd9
[gha] Correct env var
cderv Feb 15, 2023
6540674
[gha] correct relative path
cderv Feb 15, 2023
a94e02a
[fix] Use `npx.cmd` on Windows
cderv Feb 15, 2023
8afe538
[test environment] handle tinytex download failure due to API rate li…
cderv Feb 15, 2023
fc86625
[test environment] Use pipenv to handle python environment
cderv Feb 15, 2023
493afbf
[test environment] Add the Julia Manifest of locked packages
cderv Feb 15, 2023
f9e666c
[gha] Fix linux by installing missing curl deps
cderv Feb 15, 2023
a0c5ba6
[gha] PAK does not work for renv::restore() yet
cderv Feb 15, 2023
7734564
Update helper configuration script
cderv Feb 15, 2023
2bccf18
[test environment] pexpect module is required for quarto check on Linux
cderv Feb 15, 2023
8fb8700
Merge branch 'windows/run-tests' of https://github.com/quarto-dev/qua…
cderv Feb 15, 2023
8c52871
[test environment] update configuration file
cderv Feb 15, 2023
ee07cd1
[test environment] Update python lock file on windows
cderv Feb 15, 2023
76b19f2
[test environment] Also check and configure R environment
cderv Feb 15, 2023
ee32eeb
[test environment] Let install pipenv for the developer
cderv Feb 15, 2023
bd05799
[test environment] script should be executable
cderv Feb 15, 2023
fabd94a
[test environment] Add logging to configure script
cderv Feb 15, 2023
db9fbbc
[test environment] ptyprocess seems required on Linux in GHA
cderv Feb 15, 2023
9da0c0f
[test environment] Windows adjustement in pipfile.lock
cderv Feb 15, 2023
0ae836f
[gha] Clean workflow and reactivate other workflows
cderv Feb 15, 2023
576f48f
[test envrionment] Initiate a README for tests
cderv Feb 15, 2023
1aca02d
[test environment] Auto activate the virtualenv when running tests
cderv Feb 15, 2023
cc385a8
[test environment] Run configuration as part of running tests
cderv Feb 15, 2023
3a0ff79
[test environment] Improve documentation in README
cderv Feb 15, 2023
62978a7
Merge branch 'main' into windows/run-tests
cderv Feb 15, 2023
e7cb9b7
[test environment] Don't use which to find if a command is available
cderv Feb 16, 2023
3e66c4e
[gha] Don't run playwright tests on windows
cderv Feb 16, 2023
9b267da
[test environment] Be more clear on what check if something is missing
cderv Feb 16, 2023
35b0c94
[test environment] Update README.md with more info on requirements
cderv Feb 16, 2023
bdfc2cb
[fix] Move the exception at upper level
cderv Feb 16, 2023
8b0c13f
[test environment] Add a mechanism to work within an existing python …
cderv Feb 16, 2023
6021f50
[test environment] Update documentation in README
cderv Feb 16, 2023
7548164
Revert "[gha] Don't run playwright tests on windows"
cderv Feb 17, 2023
72ac8ba
[gha] Run playwright on Windows at least once a day by scheduling wor…
cderv Feb 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .github/workflows/actions/quarto-dev/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,32 @@ description: "Configures the image for Quarto Development"
runs:
using: "composite"
steps:
- name: Set Path
- name: Configure Quarto (.sh)
if: runner.os != 'Windows'
shell: bash
run: |
echo "$HOME/bin" >> $GITHUB_PATH
# install with symlink in /usr/local/bin which in PATH on CI
./configure.sh

- name: Configure Quarto
shell: bash
- name: Configure Quarto (.ps1)
if: runner.os == 'Windows'
shell: pwsh
run: |
./configure.sh
./configure.cmd
"$(Get-ChildItem -Path ./package/dist/bin/quarto.cmd | %{ $_.FullName } | Split-Path)" >> $env:GITHUB_PATH

- shell: pwsh
if: runner.os == 'Windows'
run: $env:PATH -Split ";"

- name: Basic dev mode sanity check
shell: bash
shell: pwsh
run: |
[ "$(quarto --version)" == "99.9.9" ] || exit 1
[ "$(quarto --paths | grep package/dist/share)" == "" ] || exit 1
[ "$(git status --porcelain)" == "" ] || exit 1
If ( "$(quarto --version)" -ne "99.9.9") { Exit 1 }
If ( $(quarto --paths | Select-String -Pattern "package[/\\]+dist[/\\]+share") -ne $null ) { Exit 1 }
If ( "$(git status --porcelain)" -ne "" ) { Exit 1 }

- name: Quarto Check
shell: bash
run: |
pushd tests
quarto check
popd
working-directory: tests
shell: pwsh
run: quarto check
2 changes: 1 addition & 1 deletion .github/workflows/performance-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# move the TS file so quarto command will use bundled JS
mv src/quarto.ts src/quarto1.ts

pushd package/pkg-working/bin

# test a bare quarto command
Expand Down
106 changes: 76 additions & 30 deletions .github/workflows/test-smokes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ on:
push:
# only trigger on branches, not on tags
branches: [main]
env:
RENV_PATHS_ROOT: ~/.local/share/renv

# Ubuntu: ~/.local/share/renv
# macOS: ~/Library/Application Support/renv
# Windows: %LOCALAPPDATA%/renv
schedule:
- cron: "0 6 * * *"

jobs:
run-smokes:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout Repo
Expand All @@ -26,33 +26,62 @@ jobs:
# checkout full tree
fetch-depth: 0

- name: Fix temp dir to use runner one (windows)
if: runner.os == 'Windows'
run: |
echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
echo "TMP=${{ runner.temp }}" >> $GITHUB_ENV
echo "TEMP=${{ runner.temp }}" >> $GITHUB_ENV
shell: bash

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: "4.2.2"

- name: Install node (for Playwright)
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install node dependencies
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
run: yarn
working-directory: ./tests/integration/playwright
shell: bash

- name: Install Playwright Browsers
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
run: npx playwright install --with-deps
working-directory: ./tests/integration/playwright

- name: Cache packages
- name: Set RENV_PATHS_ROOT
shell: bash
run: |
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV

- name: Get R and OS version
id: get-version
run: |
cat("os-version=", sessionInfo()$running, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
cat("r-version=", R.Version()$version.string, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-1-renv-${{ hashFiles('**/renv.lock') }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-1-${{ hashFiles('renv.lock') }}
restore-keys: |
${{ runner.os }}-1-renv-
${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-1-

- name: Restore packages
- name: Install missing system deps
if: runner.os == 'Linux'
run: |
sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev

- name: Restore R packages
working-directory: tests
run: |
if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')
Expand All @@ -62,18 +91,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: "pip"
cache: "pipenv"
cache-dependency-path: "./tests/Pipfile.lock"
python-version-file: "./tests/.python-version"

- name: Python Dependencies
- name: Restore Python Dependencies
working-directory: tests
run: |
pushd tests
source bin/activate
python3 -m pip install --upgrade pip pip==21.3.1
python3 -m pip install wheel
python3 -m pip install --user virtualenv
python3 -m pip install -r requirements.txt
popd
python -m pip install pipenv
pipenv install --system

- uses: ./.github/workflows/actions/quarto-dev

Expand All @@ -89,29 +115,49 @@ jobs:
- name: Setup Julia
uses: julia-actions/setup-julia@v1

- name: Julia Packages
- name: Cache Julia Packages
uses: julia-actions/cache@v1

- name: Restore Julia Packages
working-directory: tests
shell: bash
run: |
pushd tests
julia --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
popd
julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"

- name: Smoke Test Commits
if: github.event.before != ''
env:
# Useful as TinyTeX latest release is checked in run-test.sh
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout ${{ github.sha}}
pushd tests
./run-tests.sh
case $RUNNER_OS in
"Windows")
pwsh -F ./run-tests.ps1
;;
*)
./run-tests.sh
;;
esac
popd
shell: bash

- name: Smoke Test Head
env:
# Useful as TinyTeX latest release is checked in run-test.sh
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event.before == ''
run: |
pushd tests
quarto render docs/test.qmd --to pdf
./run-tests.sh
popd
case $RUNNER_OS in
"Windows")
../package/dist/bin/quarto.cmd render docs/test.qmd --to pdf
pwsh -F ./run-test.ps1
;;
*)
quarto render docs/test.qmd --to pdf
./run-tests.sh
;;
esac
working-directory: tests
shell: bash
29 changes: 28 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"program": "${workspaceFolder}/src/quarto.ts",
"args": ["serve"],
"cwd": "${workspaceFolder}/../quarto-demo",
"runtimeExecutable": "deno",
"runtimeExecutable": "${workspaceFolder}/package/dist/bin/tools/deno",
"runtimeArgs": [
"run",
Expand All @@ -28,6 +27,34 @@
"windows": {
"runtimeExecutable": "${workspaceFolder}\\package\\dist\\bin\\tools\\deno.exe"
}
},
{
"name": "Run Quarto test",
"request": "launch",
"type": "node",
"program": "smoke/smoke-all.test.ts", // test script here
"args": [], // args to the script here, like in command line smoke/smoke-all.test.t -- .\docs\smoke-all\2023\01\19\2107.qmd
"cwd": "${workspaceFolder}/tests",
"runtimeExecutable": "${workspaceFolder}/package/dist/bin/tools/deno",
"runtimeArgs": [
"test",
"--config=test-conf.json",
"--unstable",
"--allow-all",
"--check",
"--importmap=${workspaceFolder}/src/import_map.json",
"--inspect-brk"
],
"env": {
"QUARTO_ROOT": "${workspaceFolder}",
"QUARTO_BIN_PATH": "${workspaceFolder}/package/dist/bin",
"QUARTO_SHARE_PATH": "${workspaceFolder}/src/resources",
"QUARTO_DEBUG": "true"
},
"attachSimplePort": 9229,
"windows": {
"runtimeExecutable": "${workspaceFolder}\\package\\dist\\bin\\tools\\deno.exe"
}
}
]
}
11 changes: 7 additions & 4 deletions configure.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ REM using ! ! instead of % %. However, this only allows one level of expansio
REM try to create a variable that derives from a derived variable. It will be empty.

REM First Check that Deno isn't running since this causes weird and confusing errors
tasklist /fi "ImageName eq deno.exe" /fo csv 2>NUL | find /I "deno.exe">NUL
REM find can conflict with one provided in bash with other args so use absolute path
tasklist /fi "ImageName eq deno.exe" /fo csv 2>NUL | "%WINDIR%/system32/find" /I "deno.exe">NUL
if "%ERRORLEVEL%"=="0" goto :denoRunning

call package\src\store_win_configuration.bat
Expand All @@ -28,7 +29,8 @@ if "%QUARTO_VENDOR_BINARIES%" == "true" (
CURL --fail -L "https://github.com/denoland/deno/releases/download/!DENO!/!DENO_FILE!" -o "!DENO_FILE!"
REM Windows doesn't have unzip installed by default, but starting in Windows 10 build 17063 they did
REM include a build in 'tar' command. Windows 10 build 17063 was released in 2017.
tar -xf !DENO_FILE!
REM We need to use absolute if another tar is in PATH, that would not support .zip extension
%WINDIR%/System32/tar -xf !DENO_FILE!

REM If tar failed, try unzipping it.
IF %ERRORLEVEL% NEQ 0 (
Expand Down Expand Up @@ -86,13 +88,14 @@ ECHO Downloading Deno Stdlib
CALL !QUARTO_PACKAGE_PATH!\scripts\deno_std\download.bat

SET QUARTO_DENO_EXTRA_OPTIONS="--reload"
IF EXIST !QUARTO_BIN_PATH!\quarto.bat (
IF EXIST !QUARTO_BIN_PATH!\quarto.cmd (
CALL "!QUARTO_BIN_PATH!\quarto" --version
)

ECHO NOTE: To use quarto please use quarto-cmd (located in this folder) or add the following path to your PATH
ECHO NOTE: To use quarto please use quarto.cmd (located in this folder) or add the following path to your PATH
ECHO !QUARTO_BIN_PATH!

endlocal & set QUARTO_BIN_DEV=%QUARTO_BIN_PATH%

GOTO :eof

Expand Down
10 changes: 5 additions & 5 deletions package/src/store_win_configuration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ echo set "QUARTO_ROOT=%%~dp0" >> %~dp0\..\..\win_configuration.bat
:: zip file archives that we build.

:: These are the paths within the Quarto source tree - the "package" subfolder.
echo set "QUARTO_SRC_PATH=%%~dp0\src" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_PACKAGE_PATH=%%~dp0\%%QUARTO_PACKAGE_DIR%%" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_SRC_PATH=%%~dp0src" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_PACKAGE_PATH=%%~dp0%%QUARTO_PACKAGE_DIR%%" >> %~dp0\..\..\win_configuration.bat

:: These paths end up in the output package or conda build prefix.
echo set "QUARTO_DIST_PATH=%%~dp0\%%QUARTO_PACKAGE_DIR%%\%%QUARTO_DIST_DIR%%" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_SHARE_PATH=%%~dp0\%%QUARTO_PACKAGE_DIR%%\%%QUARTO_DIST_DIR%%\%%QUARTO_SHARE_DIR%%" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_BIN_PATH=%%~dp0\%%QUARTO_PACKAGE_DIR%%\%%QUARTO_DIST_DIR%%\%%QUARTO_BIN_DIR%%" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_DIST_PATH=%%~dp0%%QUARTO_PACKAGE_DIR%%\%%QUARTO_DIST_DIR%%" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_SHARE_PATH=%%~dp0%%QUARTO_PACKAGE_DIR%%\%%QUARTO_DIST_DIR%%\%%QUARTO_SHARE_DIR%%" >> %~dp0\..\..\win_configuration.bat
echo set "QUARTO_BIN_PATH=%%~dp0%%QUARTO_PACKAGE_DIR%%\%%QUARTO_DIST_DIR%%\%%QUARTO_BIN_DIR%%" >> %~dp0\..\..\win_configuration.bat

echo "Translated/recorded configuration settings from unix configuration script"
11 changes: 7 additions & 4 deletions src/command/render/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
*/

import { dirname, join } from "path/mod.ts";
import { existsSync } from "fs/mod.ts";

import { normalizePath, ResolvedPathGlobs, resolvePathGlobs } from "../../core/path.ts";
import {
normalizePath,
ResolvedPathGlobs,
resolvePathGlobs,
safeExistsSync,
} from "../../core/path.ts";
import { engineIgnoreGlobs } from "../../execute/engine.ts";
import { kQuartoScratch } from "../../project/project-scratch.ts";
import { extractResolvedResourceFilenamesFromQmd } from "../../execute/ojs/extract-resources.ts";
Expand Down Expand Up @@ -105,7 +108,7 @@ export async function resourceFilesFromFile(
if (!selfContained) {
const resultFiles = resources.files
.map((file) => join(resourceDir, file))
.filter(existsSync)
.filter(safeExistsSync)
.map(normalizePath);
fileResourceFiles.include.push(...resultFiles);
}
Expand Down
2 changes: 1 addition & 1 deletion src/extension/extension-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ExtensionSource {
export async function extensionSource(
target: string,
): Promise<ExtensionSource | undefined> {
if (existsSync(target)) {
if (!target.match(/^https?:\/\/.*$/) && existsSync(target)) {
return { type: "local", resolvedTarget: target };
}

Expand Down
11 changes: 11 additions & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Python Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

bin/
/.luarc.json
1 change: 1 addition & 0 deletions tests/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.1
Loading