Skip to content

Commit

Permalink
Support macOS 14
Browse files Browse the repository at this point in the history
macOS version 14 removed the `/usr/local/var/` directory. In order to
support that release of the operating system, use the more conventional
[1] `/var/run/` directory, instead. Extend the configuration of the
project's continuous integration environment to include macOS 14.

[1] `/var/run/` is defined by the Filesystem Hierarchy Standard for the
    purpose of UNIX-domain sockets. Although `/run/` is the modern
    equivalent, macOS 14 does not support it.
  • Loading branch information
jugglinmike committed Jun 4, 2024
1 parent 83b2697 commit 4751b99
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ jobs:

strategy:
matrix:
os: [windows-2022]
os: [windows-2022, macos-14]
node-version: ['18.x']
test-command:
- npm run test-style
- npm run test-types
- npm run test-unit
exclude:
# The `test-style` script is platform-independent, so there is no
# value in executing it in multiple operating systems.
- os: macos-14
test-command: npm run test-style
# The `test-types` script is platform-independent, so there is no
# value in executing it in multiple operating systems.
- os: macos-14
test-command: npm run test-types

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions lib/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const createCommandServer = require('../create-command-server');
const createVoiceServer = require('../create-voice-server');

const WINDOWS_NAMED_PIPE = '\\\\?\\pipe\\my_pipe';
const MACOS_SYSTEM_DIR = '/usr/local/var/at_driver_generic';
const MACOS_SOCKET_UNIX_PATH = '/usr/local/var/at_driver_generic/driver.socket';
const MACOS_SYSTEM_DIR = '/var/run/at_driver_generic';
const MACOS_SOCKET_UNIX_PATH = '/var/run/at_driver_generic/driver.socket';
const DEFAULT_PORT = 4382;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ATDriverClientUnix {
}
}

static let pipe = "/usr/local/var/at_driver_generic/driver.socket"
static let pipe = "/var/run/at_driver_generic/driver.socket"

func sendInitEvent() throws {
try self._sendEvent(name: "lifecycle", data: "hello")
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const WebSocket = require('ws');

const SOCKET_PATH = {
win32: '\\\\?\\pipe\\my_pipe',
darwin: '/usr/local/var/at_driver_generic/driver.socket',
darwin: '/var/run/at_driver_generic/driver.socket',
}[process.platform];

const executable = path.join(__dirname, '..', 'bin', 'at-driver');
Expand Down

0 comments on commit 4751b99

Please sign in to comment.