(execPath: string = process.execPath)
| 146 | * Returns null if the file doesn't exist or can't be read. |
| 147 | */ |
| 148 | export function readVersionHash(execPath: string = process.execPath): string | null { |
| 149 | try { |
| 150 | const versionFile = path.resolve(path.dirname(execPath), '.version'); |
| 151 | return fs.readFileSync(versionFile, 'utf-8').trim() || null; |
| 152 | } catch { |
| 153 | return null; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * Resolve the gstack home directory. |
no outgoing calls
no test coverage detected