Skip to content

Commit

Permalink
Fix SwiftLint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
williambj1 committed Jan 14, 2021
1 parent 229f2ef commit ffb233e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/SwiftLint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: SwiftLint

on:
push:
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
pull_request:
paths:
- '**/*.swift'

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: SwiftLint
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
5 changes: 0 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
fi
shell: zsh {0}

- name: SwiftLint
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}

- name: Debug Build
run: |
xcodebuild -workspace HeliPort.xcworkspace -scheme HeliPort -configuration Debug -derivedDataPath build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty && exit ${PIPESTATUS[0]}
6 changes: 3 additions & 3 deletions HeliPort/Supporting files/BugReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class BugReporter {
let masterPort = IOServiceGetMatchingService(kIOMasterPortDefault, nil)
let gOptionsRef = IORegistryEntryFromPath(masterPort, "IODeviceTree:/options")
let keyRef = CFStringCreateWithCString(kCFAllocatorDefault,
"boot-args",
CFStringBuiltInEncodings.UTF8.rawValue)
"boot-args",
CFStringBuiltInEncodings.UTF8.rawValue)

if let valueRef = IORegistryEntryCreateCFProperty(gOptionsRef, keyRef, kCFAllocatorDefault, 0) {
var bootArgs: String?
Expand All @@ -71,7 +71,7 @@ class BugReporter {
} else {
bootArgs = valueRef.takeRetainedValue() as? String
}
if bootArgs?.contains("msgbuf=1048576") != nil {
if bootArgs != nil, bootArgs!.contains("msgbuf=1048576") {
// boot-args is available, get dmesg logs
response = NSAppleScript(source:
"""
Expand Down

0 comments on commit ffb233e

Please sign in to comment.