Skip to content

make exclude environment files work on multiple OS #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jan 5, 2023
Merged

Conversation

bcwu
Copy link
Contributor

@bcwu bcwu commented Oct 18, 2022

Description

Fixes #285

discovered that --exclude glob patterns do not work on Windows, fix is outside of the scope of this PR but issue is logged as follows:
#320

@kgartland-rstudio
Copy link
Contributor

Verified that we now exclude proper folders like .git by default on Windows, but the --exclude flag still doesn't work properly.

> tree
C:.
|--.git
|--ignore_me

rsconnect write-manifest dash ./ --exclude ignore_me

yet ignore_me is still in the file list in the manifest while .git is not.

@bcwu bcwu force-pushed the bcwu-excludefiles branch from 596e933 to 8c4171a Compare November 17, 2022 21:21
@kgartland-rstudio
Copy link
Contributor

kgartland-rstudio commented Nov 28, 2022

I'm still having some issues with this.

test case:
single sub-folder with a file in it:
ignore-folder/sub-file.txt

command:
rsconnect write-manifest dash ./ --exclude ignore-folder

The manifest created contains the ignore-folder:
Screen Shot 2022-11-28 at 12 14 33 PM

The following command works in this scenario:
rsconnect write-manifest dash ./ --exclude ignore-folder/*

test case:
single sub-folder with an additional sub-file and sub-folder and file in it:
ignore-folder/sub-file.txt
ignore-folder/sub-file2.txt
ignore-folder/sub-folder

command:
rsconnect write-manifest dash ./ --exclude ignore-folder/*

error:
Screen Shot 2022-11-28 at 12 50 20 PM

It seems if there are multiple files or folders in the excluded folder, it will error with the above failure.

@bcwu bcwu changed the title make exclude files work on multiple OS make exclude environment files work on multiple OS Dec 6, 2022
@kgartland-rstudio
Copy link
Contributor

Confirmed that using the --exclude flag works on windows now with both files and folders with and without subdirectories.

It also ignores folders and files that match our exclusion list:

.Rproj.user
.env
.git
.svn
.venv
__pycache__
env
packrat
renv
rsconnect-python
rsconnect
venv

@bcwu bcwu merged commit 0ed5755 into master Jan 5, 2023
@bcwu bcwu deleted the bcwu-excludefiles branch January 5, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rsconnect write-manifest not excluding files on windows
3 participants