1

I'm here to ask you a very strange problem.

Right now i'm starting to work on Salesforce technology, in windows, and currently i follow the tutorial. When finally arrive to the terminal part, Windows come out to create problem...

I state that I am using the terminal of Git Bash Here (MinTTY)

$ sfdx force:data:record:create -s Account -v "Name='Hilton Union Square' BillingStreet='333 O Farrell St' BillingCity='San Francisco' BillingState='CA' BillingPostalCode='94102' Phone='(415) 771-1400' Website='www.hilton.com'"
"C:\Program" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.

More in general, the problem comes out every time there are Quote in the argument:

$ sfdx ""
"C:\Program" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.

opposite to:

$ sfdx
Salesforce CLI

VERSION
  sfdx-cli/7.157.0 win32-x64 node-v16.15.1

USAGE
  $ sfdx [COMMAND]

TOPICS
  alias    manage username aliases
  auth     authorize an org for use with the Salesforce CLI
  config   configure the Salesforce CLI
......

I try almost every thing: alias, Path, Full Path, Short Path, Quote, ... this is my current path:

PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/A409806/bin:/c/Program Files/Common Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files (x86)/WindowsPowerShell/Scripts:/cmd:/c/Program Files/nodejs:/c/Users/A409806/AppData/Local/Microsoft/WindowsApps:/c/Program Files/sfdx/bin:/c/Users/A409806/AppData/Roaming/npm:/c/Users/A409806/AppData/Local/Programs/Microsoft VS Code/bin:/c/Users/A409806/AppData/Local/JetBrains/Toolbox/scripts:/usr/bin/vendor_perl:/usr/bin/core_perl

Please, someone help me, i suppose is MinTTY problem, but i can't immage how solve it.

Thanks agane


UPDATE

I expose same problem and find de solution here: Solution

  • 1
    Two things: 1) *somewhere*, probably in the depths of the `sdfx` code it's calling an executable in `C:\Program Files\somewhere` and it's not properly quoting it. So you could try to track that down, or you could try uninstalling and reinstalling it in a folder with no spaces in the name. 2) the saleforce page *does* say in a big red box, not to use a Linux terminal (like Git Bash). https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm You could try running it from the windows `cmd` shell. – GregHNZ Jul 08 '22 at 09:03
  • 1
    Since the error message obviously comes from a Windows batch program and not from bash, it depends what happens inside sfdx. You seem to call sfdx from your bash shell, and sfdx in turn invokes some batch file (or is itself a batch file). In both cases, you need to ensure that the environment variables are in a format that Windows batch can use them. – user1934428 Jul 08 '22 at 09:46

0 Answers0