@cloud411716/fancy-webnovel 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,7 @@ function isValidPath(p) {
|
|
|
23
23
|
const bootstrap = {
|
|
24
24
|
askPath() {
|
|
25
25
|
return {
|
|
26
|
+
id: 'path',
|
|
26
27
|
question: '📂 请输入项目根路径(输入 . 代表当前路径)',
|
|
27
28
|
};
|
|
28
29
|
},
|
|
@@ -90,7 +91,7 @@ export function apply(ctx) {
|
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
if (projectRoot === '.') {
|
|
93
|
-
projectRoot = process.cwd();
|
|
94
|
+
projectRoot = session.header?.cwd ?? process.cwd();
|
|
94
95
|
notify(session, bootstrap.notify({ type: 'using_cwd', projectRoot }));
|
|
95
96
|
}
|
|
96
97
|
|
package/commands/scan/index.js
CHANGED
|
@@ -126,7 +126,7 @@ export function apply(ctx) {
|
|
|
126
126
|
const { signal } = invocation;
|
|
127
127
|
|
|
128
128
|
// ---------- check project root ----------
|
|
129
|
-
const projectRoot = process.cwd();
|
|
129
|
+
const projectRoot = session.header?.cwd ?? process.cwd();
|
|
130
130
|
if (!existsSync(join(projectRoot, '.fancy-deployed'))) {
|
|
131
131
|
notify(session, scan.notify({ type: 'not_initialized' }));
|
|
132
132
|
return { kind: 'success', text: '' };
|