Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Fix: 'error: ProcessInfo initializer is inaccessible due to internal …
Browse files Browse the repository at this point in the history
…protection level'
  • Loading branch information
mattt committed Mar 28, 2020
1 parent 74f7ea3 commit 02240c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/SwiftDocTests/Helpers/temporaryFile.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Foundation

func temporaryFile(path: String? = nil, contents: String) throws -> URL {
let temporaryDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(ProcessInfo().globallyUniqueString)
let temporaryDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(ProcessInfo.processInfo.globallyUniqueString)
try FileManager.default.createDirectory(at: temporaryDirectoryURL, withIntermediateDirectories: true, attributes: [.posixPermissions: 0o766])

let path = path ?? ProcessInfo().globallyUniqueString
let path = path ?? ProcessInfo.processInfo.globallyUniqueString
let temporaryFileURL = temporaryDirectoryURL.appendingPathComponent(path)

try contents.data(using: .utf8)?.write(to: temporaryFileURL)
Expand Down

0 comments on commit 02240c5

Please sign in to comment.