Grails Special Environment

when I try to use custom environments in grails by setting the environment name like

grails -Dgrails.env=demo run-app 

I get an error

 Script 'demo' not found, did you mean: ... 

It seems that this problem exists only in windows environment - on Linux, everything works fine ...

Sorry, I forgot to mention that I am using Grails v 2.0.3

+6
source share
1 answer

found solution:

Windows

quotes around the parameter are needed:

 grails "-Dgrails.env=demo" run-app 

it works both for OS: windows and linux!

Update:

It seems that only powershell windows need quotes, but linux accepts them too:

 grails "-Dgrails.env=demo" run-app 

For windows cmd.exe you need to use the operator without quotes:

 grails -Dgrails.env=demo run-app 

horrible.

+7
source

Source: https://habr.com/ru/post/914527/


All Articles