On Tue, Apr 16, 2024 at 11:09 PM Shivli Srivastava <shivli...@gmail.com>
wrote:

> On Wed, Apr 17, 2024 at 11:37 AM Shivli Srivastava <shivli...@gmail.com>
> wrote:
>
>> java -cp /Users/shivli.srivastava/Downloads/jars/bcmail-jdk15on-
>> 159.jar:/Users/shivli.srivastava/Downloads/jars/
>> bcpkix-jdk15on-155.jar:/Users/shivli.srivastava/Downloads/
>> jars/bcprov-jdk15on-155.jar:/Users/shivli.srivastava/
>> Downloads/jars/xml-apis-1.4.01.jar:/Users/shivli.
>> srivastava/Downloads/jars/xercesImpl-2.12.2.jar:DigitalSign.jar org/Sign
>>
>> It ran as expected in my working directory .
>> The issue was setting the current working directory .
>> After setting the wd the command ran as expected.
>>
>> wd, err := os.Getwd()
>> if err != nil {
>>     return "", err
>> }
>>
>> command.Dir = wd
>>
>>
>>>
I am confused by your reply. If the os/exec.Cmd.Dir structure member is the
empty string the os/exec package should use the current directory. The code
you showed us when you started this discussion thread used exec.Command()
which would have defaulted the Cmd.Dir structure member to the empty
string. Furthermore, your original code looked like
exec.Command().CombinedOutput(); it didn't have an explicit command
variable whose Dir structure member could be altered. So it seems like you
aren't telling us the whole story.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-W4meczxE0R3Vk-WmEbiJ-wXxVbo6Q4JjO93RBDxYQYQ%40mail.gmail.com.

Reply via email to