Closed Shirkit closed 7 years ago
You have to run it from the theme directory.
In your case...
cd sage-master
vendor/bin/sage.bat meta
vendor/bin/sage.bat config
vendor/bin/sage.bat preset
Ooops 👍
Note that on Windows that you need to use backslashes:
cd sage-master
vendor\bin\sage.bat meta
vendor\bin\sage.bat config
vendor\bin\sage.bat preset
or you can wrap the path in quotes:
cd sage-master
"vendor/bin/sage.bat" meta
"vendor/bin/sage.bat" config
"vendor/bin/sage.bat" preset
Tried spinning up a Sage project today, on a Windows machine.. I'm not having any success with the commands you've mentioned above.
C:\laragon\www\sage-theme\wp-content\themes\sage-theme
λ php vendor\bin\sage meta
dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../roots/sage-installer/bin" && pwd)
if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
# We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi
"${dir}/sage" "$@"
C:\laragon\www\sage-theme\wp-content\themes\sage-theme
λ php vendor\bin\sage.bat meta
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../roots/sage-installer/bin/sage
php "%BIN_TARGET%" %*
C:\laragon\www\sage-theme\wp-content\themes\sage-theme
λ php vendor\bin\sage.bat config
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../roots/sage-installer/bin/sage
php "%BIN_TARGET%" %*
C:\laragon\www\sage-theme\wp-content\themes\sage-theme
λ php vendor\bin\sage.bat preset
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../roots/sage-installer/bin/sage
php "%BIN_TARGET%" %*
Back when I was using Cygwin, this is how I ran these commands: https://discourse.roots.io/t/no-option-prompts-for-composer-sage-install-on-windows/11339/3?u=mmirus
That syntax or some of the others in the thread may help. Let us know on Discourse if not - that's a better place than GitHub for support requests. Good luck!
Ah, you know what, I misread the commands you posted. I had put php
in front of my commands (that was from a piece of advice I read somewhere else).
Running the commands
"vendor/bin/sage.bat" meta
"vendor/bin/sage.bat" config
"vendor/bin/sage.bat" preset
works for me. Thanks for the prompt reply!
If anyone stumbles into this down the road, I'm using a program called Cmder in place of Windows' standard command line program.
Ok, so following @QWp6t 's suggestion, I've posted the issue here.
Trying the composer installation on Windows 10.1 is resulting in an error.
I followed the installation instructions on the Github repo
composer create-project roots/sage your-theme-name dev-master
.After the composer installation failed, doing
sage meta
andsage config
, as suggested, results in exceptions being thrown, andsage preset
prolly cannot run since the setup is not finished yet.Windows 10.1 PHP 7.1.7 Node 7.6.0 NPM 4.1.2 Local build.