shaonianche commented on issue #5757:
URL: https://github.com/apache/opendal/issues/5757#issuecomment-2720609612

   > Hi, I don't have development experience on Windows, so I'm not sure how to 
fix this. However, I assume we should at least ignore this error and allow the 
build to proceed.
   
   This can be resolved by using a try catch, and Falling back to a default 
version when you can't get git describe output.
   I'm not sure if the above scenario meets your expectations.
   
   ```javascript
   try {
           const refName = exec(
             "git describe --tags --abbrev=0 --match 'v*' --exclude '*rc*'",
           ).toString();
           const version = semver.parse(refName, {}, true);
           return `${version.major}.${version.minor}.${version.patch}`;
         } catch (error) {
           console.warn("Falling back to default version 0.0.0");
           return "0.0.0";
         }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to