script-server icon indicating copy to clipboard operation
script-server copied to clipboard

runner does not appear in GUI when working_directory ends with slash

Open RollingHog opened this issue 3 years ago • 4 comments

Replication:

  • add working_directory parameter ending with slash /. Example: /home/dp/Desktop/MyProject/

Proposal:

  • if it's caused by failed parsing - show "cannot parse [json]" (see #521)
  • alter parsing code and allow trailing slash

I can try to implement first or second solution as soon as repo owner choose which one is preferable

RollingHog avatar Feb 14 '22 08:02 RollingHog

Hi @RollingHog, I'm not 100% sure if I understand it. Is it json parsing error or some other error on script server side? Because if it's json error, then the json file is corrupted and should be formatted properly with json

bugy avatar Feb 14 '22 11:02 bugy

Sorry, will try to clarify. You see, this file

{
  "script_path": "docker-compose up -d",
  "working_directory": "/home/dp/Desktop/backend"
}

appears in web GUI left panel properly; but this file (which only difference is trailing slash / in working_directory key) doesn't:

{
  "script_path": "docker-compose up -d",
  "working_directory": "/home/dp/Desktop/backend/"
}

My system is (L)ubuntu in case it matters.

RollingHog avatar Feb 14 '22 12:02 RollingHog

And which error do you see in server logs?

bugy avatar Feb 14 '22 12:02 bugy

I must apologize. Error does not replicate, logs are clear. I'm not sure why I didn't see scripts but looks like it was not because of trailing slash. I'll try to replicate it later with fresher head, but looks like it doesn't cause the problem.

upd: but trailing slash makes it think that its a network adress, still no good, but not connected to this issue

RollingHog avatar Feb 14 '22 13:02 RollingHog