import { homedir } from 'node:os';
import { join } from 'node:path';
export function expandHomePath(path) {
    if (path === '~') {
        return homedir();
    }
    if (path.startsWith('~/')) {
        return join(homedir(), path.slice(2));
    }
    return path;
}
export function expandOptionalHomePath(path) {
    return path === undefined ? undefined : expandHomePath(path);
}
//# sourceMappingURL=pathExpansion.js.map