Handle cross-platform paths for Linux and MacOS
masterWhen developing modules intended to run on Linux and MacOS, remember that these operating systems are case-sensitive regarding paths and files.
To ensure path compatibility:
- Use
Import-ModuleFile: This command is preconfigured to resolve file paths, reliably converting notations that might otherwise fail on different systems. Content imported via this command does not need to worry about specific path separators. - Use Path Resolution Utilities: To make your own code resilient to OS-specific path notations, use
Resolve-Pathor the more robustResolve-PSFPathinstead of hardcoding string paths.