#14 create Package bug

1.0
open
Ingo
None
2020-01-18
2019-04-06
aliazzz
No

Hi,

I found a bug in the "create package" command in cForge. Apperently spaces in the CWD are not permitted.
See the following output;

----------------------------------------------------------------------------
cforge started
Build date:     $WCNOW$
Revision based: $WCREV$
----------------------------------------------------------------------------

Easy attach enabled. Now attach with debugger, and then press Enter here!

CWD: C:\Users\user\Desktop\I2C mcp7941x
User elevated: False
default case: --create-package

[INFO] Executing: C:\Program Files\CODESYS 3.5.14.0\CODESYS\CFORGE\Scripts\create-package.py

[Exception] command create-package.py caused an exception:
Traceback (most recent call last):
  File "C:\Program Files\CODESYS 3.5.14.0\CODESYS\CFORGE\Scripts\create-package.py", line 145, in <module>
IOError: [Errno 2] Could not find a part of the path 'C:\Users\user\Desktop\I2C\license.txt'.: C:\Users\user\Desktop\I2C\license.txt

----------------------------------------------------------------------------
cforge finished.
----------------------------------------------------------------------------

As clearly seen, the original path is "C:\Users\user\Desktop\I2C mcp7941x"
But the output is being written to "C:\Users\user\Desktop\I2C\" which fails.

Discussion

  • aliazzz

    aliazzz - 2020-01-18

    I cannot try it out any more, but in hindsight, without even trying your suggestion I'd say point 2 is valid. Whenever spaces are present in a windows path, one must open and close the entire string with surrounding quotes. So It should be: "%V".

     

    Last edit: aliazzz 2020-01-18
  • i-campbell

    i-campbell - 2020-01-18

    So we need someone to change setup.reg..
    Replace:
    %V
    With:
    \"%V\"
    And then test if the problem is solved.
    If still doesn't work, further investigation of how the C# program calls the python program

     
    • aliazzz

      aliazzz - 2020-01-18

      Why don't you do the change and test?
      I haven't got write-access

       
  • i-campbell

    i-campbell - 2020-01-18

    I think the "pull request" workflow at the moment is as follows:
    1. create a ticket
    2. Checkout
    3. Make changes
    4. Test changes
    5. Upload the changed files to the ticket and say "dear maintainer, please accept this change because...".
    It's in the documentation somewhere.
    OK, I will make the change and test. Will have to wait until next week.

     
    πŸ‘
    1
  • i-campbell

    i-campbell - 2020-01-18

    File for testing attached
    Steps to repeat:
    1. Download and install cforge
    2. Double click this attached file to install to registry
    3. Reboot(?)
    4. Checkout random repository using its cforge:// link to "D:\folder with a space\"
    5. Right click that folder in explorer and "create package manifest"
    ==>IS: "can't find D:\folder\liscence.txt"
    ==>SHOULD: create manifest successfully

     
    πŸ‘
    1
  • aliazzz

    aliazzz - 2020-01-18

    I haven't seen any such postings on any PR workflow, but offcourse it sounds good.

    A better way, if cforge can handle it, is to clone the project to the users home, then edit it and creat a PR to the original master. That workflow mimics GitHub. Is such a workflow and option? > Ticket idea!

    see ticket request 78: Github like workflow for PR

     

    Last edit: aliazzz 2020-01-18

Log in to post a comment.