I am stuck at Salesforce DX lesson 3 create and test our scratch org. 'C:\Program' is not recognized as an internal or external command, operable program or batch file.
I have also discovered that this is inconsistent with GitBash. I was running into the same issue on the Get Ready to Create an App Unit in the Salesforce DX series. I tried multiple things to get this to pull the accounts in with the SOQL query, but it kept giving me the same error.
ONce I switched to the standard CLI, I had a lot more consistency.
@Daniel Roberts 14 - thanks for this comment. I had the same problem. Opening the windows CMD window and running the exact same code that was failing in the GitBash shell worked.
This is the force command that was not running in GitBash
sfdx force:data:tree:export -q "SELECT Name, Location__Latitude__s, Location__Longitude__s FROM Account WHERE Location__Latitude__s != NULL AND Location__Longitude__s != NULL" -d ./data
Yeah, I came to say that it must be a problem with GIT because I did what @Daniel Roberts suggested, (closed git and did it on cmd-entering on the same directory of course-) and it worked!! Thanks !! Kinda sad 'cause GIT feels much more fast and comfort, but alright !!!
use this command
1 . Login to Dev Hub from CLI
2. Create an SFDX Project
3. Create a Scratch Org for Development
4.Open scratch Org https://rajvakati.com/2018/03/21/salesforce-dx-absolute-beginner-part-3-of-7/
sfdx force:auth:web:login --setdefaultdevhubusername --setalias my-sfdc-hub-org
After Successful login into the Dev Hub, you can see the success message into the CLI . Please share the screen shot
ONce I switched to the standard CLI, I had a lot more consistency.
This is the force command that was not running in GitBash
sfdx force:data:tree:export -q "SELECT Name, Location__Latitude__s, Location__Longitude__s FROM Account WHERE Location__Latitude__s != NULL AND Location__Longitude__s != NULL" -d ./data