message: fix(install): Use the current working directory instead of the installed directory when finding package.json (Fixes
diff: @@ -35,19 +35,14 @@ function throwError(msg: string): never {
  throw new Error(chalk.red(`Error while installing binary: ${msg}`));
  }
  -function getBinaryLocation(
  - location: string,
  - basePath: string,
  -): string | undefined {
  +function getBinaryLocation(location: string): string | undefined {
  // Check if location is valid and is a string
  if (!location || location.length === 0) {
  return undefined;
  }
  // Check if it's a URL, if not, try to resolve the path to work with either absolute or relative paths
  - return HTTP_REGEX.test(location)
  - ? location
  - : path.resolve(basePath, location);
  + return HTTP_REGEX.test(location) ? location : path.resolve(location);
  }
  function findPackageConfig(location: string, tries = 10): PackageConfig {
  @@ -59,10 +54,7 @@ function findPackageConfig(location: string, tries = 10): PackageConfig {
  const config = require(packagePath).config;
  if (config && (config.pact_binary_location || config.pact_do_not_track)) {
  return {
  - binaryLocation: getBinaryLocation(
  - config.pact_binary_location,
  - location,
  - ),
  + binaryLocation: getBinaryLocation(config.pact_binary_location),
  doNotTrack: config.pact_do_not_track,
  };
  }
  @@ -72,7 +64,7 @@ function findPackageConfig(location: string, tries = 10): PackageConfig {
  }
  export function createConfig(): Config {
  - const packageConfig = findPackageConfig(path.resolve(__dirname, '..', '..'));
  + const packageConfig = findPackageConfig(process.cwd());
  const PACT_BINARY_LOCATION =
  packageConfig.binaryLocation || PACT_DEFAULT_LOCATION;
  const CHECKSUM_SUFFIX = '.checksum';
  