Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecation warning for ANSIBLE_COLLECTIONS_PATH #1577

Merged
merged 4 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/ansible-language-server/test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ export function deleteAlsCache(): void {

export function setFixtureAnsibleCollectionPathEnv(prePendPath?: string): void {
if (prePendPath) {
process.env.ANSIBLE_COLLECTIONS_PATHS = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
process.env.ANSIBLE_COLLECTIONS_PATH = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
} else {
process.env.ANSIBLE_COLLECTIONS_PATHS =
process.env.ANSIBLE_COLLECTIONS_PATH =
ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH;
}
}

export function unSetFixtureAnsibleCollectionPathEnv(): void {
process.env.ANSIBLE_COLLECTIONS_PATHS = undefined;
process.env.ANSIBLE_COLLECTIONS_PATH = undefined;
}

export function setAnsibleConfigEnv(): void {
Expand Down
6 changes: 3 additions & 3 deletions test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ export function setFixtureAnsibleCollectionPathEnv(
prePendPath: string | undefined = undefined,
): void {
if (prePendPath) {
process.env.ANSIBLE_COLLECTIONS_PATHS = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
process.env.ANSIBLE_COLLECTIONS_PATH = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
} else {
process.env.ANSIBLE_COLLECTIONS_PATHS =
process.env.ANSIBLE_COLLECTIONS_PATH =
ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH;
}
}

export function unSetFixtureAnsibleCollectionPathEnv(): void {
process.env.ANSIBLE_COLLECTIONS_PATHS = undefined;
process.env.ANSIBLE_COLLECTIONS_PATH = undefined;
}

export async function enableExecutionEnvironmentSettings(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion test/testScripts/diagnostics/testYamlWithoutEE.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function testDiagnosticsYAMLWithoutEE(): void {
severity: 0,
message:
"Syntax Error while loading YAML.\n" +
" mapping values are not allowed in this context\n",
" mapping values are not allowed in this context",
range: new vscode.Range(
new vscode.Position(6, 21),
new vscode.Position(6, integer.MAX_VALUE),
Expand Down
Loading