Skip to content

Commit

Permalink
fix: Remove check for windows long paths as it was only relevant to t…
Browse files Browse the repository at this point in the history
…he Ruby binaries
  • Loading branch information
TimothyJones committed Mar 15, 2023
1 parent 8e4f735 commit e7778da
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/pact.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import * as path from 'path';
import * as _ from 'underscore';
import mkdirp = require('mkdirp');
import rimraf = require('rimraf');
import serverFactory, { Server, ServerOptions } from './server';
import stubFactory, { Stub, StubOptions } from './stub';
import verifierFactory from './verifier';
import { VerifierOptions } from './verifier/types';
import messageFactory from './message';
import publisherFactory from './publisher';
import canDeployFactory from './can-deploy';
import pactEnvironment from './pact-environment';
import logger, { setLogLevel } from './logger';
import { LogLevel } from './logger/types';
import { MessageOptions, PublisherOptions } from './types';
Expand All @@ -23,22 +19,6 @@ export class Pact {

constructor() {
// Check to see if we hit into Windows Long Path issue
if (pactEnvironment.isWindows()) {
try {
// Trying to trigger windows error by creating path that's over 260 characters long
const name =
'Jctyo0NXwbPN6Y1o8p2TkicKma2kfqmXwVLw6ypBX47uktBPX9FM9kbPraQXsAUZuT6BvenTbnWczXzuN4js0KB9e7P5cccxvmXPYcFhJnBvPSKGH1FlTqEOsjl8djk3md';
const dir = mkdirp.sync(path.resolve(__dirname, name, name));
if (dir) {
rimraf.sync(dir);
}
} catch {
logger.warn(
'WARNING: Windows Long Paths is not enabled and might cause Pact to crash if the path is too long. ' +
'To fix this issue, please consult https:/pact-foundation/pact-js-core#enable-long-paths`'
);
}
}

// Listen for Node exiting or someone killing the process
// Must remove all the instances of Pact mock service
Expand Down

0 comments on commit e7778da

Please sign in to comment.