crystal-lang / shards

Dependency manager for the Crystal language
Other
758 stars 99 forks source link

Postinstall Lifecycle Issue on Windows Platform #634

Closed Losses closed 2 weeks ago

Losses commented 2 weeks ago

I am encountering an issue with the postinstall lifecycle on the Windows platform. As we know, Windows does not natively support bash, and the existing scripts have different syntax compared to Unix-based systems. This discrepancy makes it challenging to create a single script that can run seamlessly across all platforms.

To address this, I propose that we consider implementing a design that allows different postinstall scripts to be executed based on the underlying platform. This way, we can ensure that the appropriate script is run for each specific environment, enhancing compatibility and reducing potential errors.

Here are some points to consider:

  1. Platform Detection: Implement a mechanism to detect the operating system or kernel type.
  2. Script Differentiation: Allow users to specify different postinstall scripts for different platforms within the Shards configuration.
  3. Execution Logic: Ensure that the correct script is executed based on the detected platform during the postinstall phase.
straight-shoota commented 2 weeks ago

Duplicate of #468