lib/taste_tester/windows.rb
# We use START to spawn a subprocess of chef-zero since if you were to do
# this directly within a terminal session it will collide with the running
# chef-zero process when the user tries to input commands leading to many
# keystrokes being lost :(
We use START to spawn a subprocess of chef-zero since if you were to do
this directly within a terminal session it will collide with the running
chef-zero process when the user tries to input commands leading to many
keystrokes being lost :(
We use START to spawn a subprocess of chef - zero since if you were to do this directly within a terminal session it will collide with the running chef - zero process when the user tries to input commands leading to many keystrokes being lost : (
def start_win_chef_zero_server
      cmd = %W{
        START "taste-tester"
        /MIN
        #{TasteTester::Config.chef_zero_path}
        --port #{@state.port}
      }.join(' ')
      if TasteTester::Config.my_hostname
        cmd << " --host #{TasteTester::Config.my_hostname}"
      else
        cmd << " --host #{@addr}"
      end
      if TasteTester::Config.chef_zero_logging
        cmd << " --log-file #{@log_file} --log-level debug"
      end
      cmd << ' --ssl' if TasteTester::Config.use_ssl
      cmd << " --file-store #{@fsroot}" if TasteTester::Config.bundle
      spawn(cmd)
      sleep(2)
    end
def start_win_chef_zero_server cmd = %W{ START "taste-tester" /MIN #{ TasteTester :: Config . chef_zero_path } --port #{ @state . port } } . join ( ' ' ) if TasteTester :: Config . my_hostname cmd << " --host #{TasteTester::Config.my_hostname}" else cmd << " --host #{@addr}" end if TasteTester :: Config . chef_zero_logging cmd << " --log-file #{@log_file} --log-level debug" end cmd << ' --ssl' if TasteTester :: Config . use_ssl cmd << " --file-store #{@fsroot}" if TasteTester :: Config . bundle spawn ( cmd ) sleep ( 2 ) end
We use START to spawn a subprocess of chef-zero since if you were to do
this directly within a terminal session it will collide with the running
chef-zero process when the user tries to input commands leading to many
keystrokes being lost :(
We use START to spawn a subprocess of chef - zero since if you were to do this directly within a terminal session it will collide with the running chef - zero process when the user tries to input commands leading to many keystrokes being lost : (
# `START` needs quotes around one of the arguments to function correctly. # rubocop:disable Lint/PercentStringArray # rubocop:enable Lint/PercentStringArray # Mixlib::Shellout will always wait for a process to finish before # returning, so we use `spawn` instead.