Sysand include fails for wildcard use in filename

I’m not sure if this is a bug or a feature. :slightly_smiling_face:

sysand --version
sysand 0.2.0

When using sysand include to add wildcard-named files, an error of: “failed to get metadata to determine if is a regular file.”

The directory contains:

project_example\packageAirframe_System.sysml
project_example\packageAvionics_System.sysml
project_example\packageNavigation_Management.sysml
project_example\packageEngine_Controls_System.sysml
project_example\packagePNT_System.sysml
project_example\packageCommunication_System.sysml
project_example\packageSensor_System.sysml
project_example\UASv2_Architecture.sysml
project_example\packageGround_Control_Station_System.sysml

and the command is issued in the project_example directory.

project_example>sysand include package*.sysml

results in:

image

Doing the sysand include command for each file does work. It appears to be a filename expansion error before trying to find the files in the named or default file path. The hint is the Windows ERROR_INVALID_NAME, which is issued when a file path has illegal characters (<, >, :, ", /, \, |, ?, *) in it.

Hi @Richard_Wallace,

This is neither a bug nor a feature, but rather a missing feature. You seem to be using Windows (based on the error code). CMD and PowerShell do not expand wildcards before passing filenames to the application (it is left for the application to deal with), and sysand does not do it either, so the * remains as-is in the name and therefore sysand fails.

POSIX-style shells expand wildcards automatically before passing the filenames to the application, so this works on macOS/Linux shells.

We’ll consider adding this functionality to sysand, as it’s a common usage pattern.
EDIT: Update: this will be included in the next sysand release.

Best regards,
Andrius

Hi @Andrius_Puksta,

Glad to hear that this will be added. Symmetry between WinX and U*x shells is a good thing.

V/r,

Richard