Skip to content

Instantly share code, notes, and snippets.

@briangreenery
Created March 16, 2015 22:15
Show Gist options
  • Save briangreenery/cc2dc1c8611dbe507d31 to your computer and use it in GitHub Desktop.
Save briangreenery/cc2dc1c8611dbe507d31 to your computer and use it in GitHub Desktop.
@echo off
set BADFOLDER=example\node_modules\sqlite3\node_modules\node-pre-gyp\node_modules\tar-pack\node_modules\readable-stream\node_modules\core-util-is
set BADFILE=%BADFOLDER%\badfile
if "%1" == "setup" (
mkdir %BADFOLDER%
echo hello > %BADFILE%
Icacls %BADFILE% /deny "Everyone:(D)"
npm install rimraf@2.3.1
echo require^('rimraf'^)^('example', console.error^); > index.js
) else if "%1" == "cleanup" (
Icacls %BADFILE% /remove Everyone
rmdir example /s /q
) else (
echo Usage: repro setup^|cleanup
exit /b 1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment