mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 20:29:08 +00:00
feat: Support community nodes on Windows (#3823)
* 🐛 Account for `APPDATA` in env * 🐛 Prevent starter installation * 🐛 Account for Win-style path delimiter * 👕 Fix lint
This commit is contained in:
@@ -5,7 +5,11 @@ import { PublicInstalledPackage } from 'n8n-workflow';
|
||||
import config from '../../config';
|
||||
import { ResponseHelper, LoadNodesAndCredentials, Push, InternalHooksManager } from '..';
|
||||
|
||||
import { RESPONSE_ERROR_MESSAGES, UNKNOWN_FAILURE_REASON } from '../constants';
|
||||
import {
|
||||
RESPONSE_ERROR_MESSAGES,
|
||||
UNKNOWN_FAILURE_REASON,
|
||||
STARTER_TEMPLATE_NAME,
|
||||
} from '../constants';
|
||||
import {
|
||||
matchMissingPackages,
|
||||
matchPackagesWithUpdates,
|
||||
@@ -80,6 +84,17 @@ nodesController.post(
|
||||
);
|
||||
}
|
||||
|
||||
if (parsed.packageName === STARTER_TEMPLATE_NAME) {
|
||||
throw new ResponseHelper.ResponseError(
|
||||
[
|
||||
`Package "${parsed.packageName}" is only a template`,
|
||||
'Please enter an actual package to install',
|
||||
].join('.'),
|
||||
undefined,
|
||||
400,
|
||||
);
|
||||
}
|
||||
|
||||
const isInstalled = await isPackageInstalled(parsed.packageName);
|
||||
const hasLoaded = hasPackageLoaded(name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user