play build: absolute --dir stays absolute; gradlew without exec bit is made executable

This commit is contained in:
CRTkafa 2026-10-29 19:45:18 +07:00
parent 0ea7292164
commit ab69ce020c
5 changed files with 29 additions and 5 deletions

View file

@ -14,7 +14,7 @@
// The comparison (webStaleness) and the capacitor config reading (webDirOf) are pure.
import { createHash } from 'node:crypto';
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
import { dirname, join, relative, sep } from 'node:path';
import { dirname, join, relative, resolve, sep } from 'node:path';
import type { ShipConfig } from './config';
import { log, warn } from './log';
import { pump } from './runner';
@ -89,7 +89,7 @@ export function capacitorCandidates(root: string): string[] {
*/
export function capacitorProject(root: string, hint?: string): CapProject | null {
if (hint) {
for (let d = join(root, hint); ; d = dirname(d)) {
for (let d = resolve(root, hint); ; d = dirname(d)) {
const rel = relative(root, d);
if (rel.startsWith('..')) break;
const c = capAt(root, rel.split(sep).join('/'));